Repository navigation
R1: 設定の保存と読込・前回の設定の復元 - #11
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…from storage Ids go straight into card HTML and element ids, so a hand-written settings file must not be able to put markup there. After a reset, remove the stored copy instead of restoring defaults with a message on the next visit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
要件定義書 §5.7 の R1(設定の保存と読込、前回設定の自動復元)を実装しました。設計は
docs/R1_DESIGN.md(2026-11-15 にオーナーが承認。§8 の問いはすべて提案どおり)です。変更内容
設定の保存・読込・初期化
<保存ファイル名>_settings.jsonを保存する。保存ファイル名が空ならplot_settings.json。{format, savedAt, files: [{name, sheet, columns}], settings}。settingsは version 4 の設定オブジェクトそのもの。スキーマは変えていない。migrate_settingsと同じ規則で読める。前回の設定の復元
mplgui.lastSettings)へ控える。次にページを開いたときに戻し、「前回の設定を復元しました」と出す。実装で決めたこと(設計書 §9 と AGENTS.md §13.5 に記録)
s1/a1/f1/c1の形に限る(系列・注釈・近似曲線・計算した列)。それ以外は振り直す。id はカードの HTML と要素の id にそのまま入るので、細工した設定ファイルで画面に HTML を差し込ませないため。fieldを付けない。#statusに欄名を出す仕組みが無いため。そのほか
pyscript.tomlも変えていない。js/settings-io.js: 純粋な部分(形・検査・移行・補完・位置の対応)。js/ui/settingsSection.js: ボタンと localStorage。tests/perf/bench.pyは、ページを開くたびに控えを消すようにした。同じコンテキストでページを開き直すと前回の設定が戻ってしまい、既定の状態から始まらないため。テスト
tests/unit/test_settings_io.pyは node でsettings-io.jsを検査する。parse_settingsに通した結果が一致することを、v1〜v4 の 11 例で確かめる。build_filenameと一致することも確かめる。tests/e2e/test_settings_io.py(17 件)は次を確かめる。計測値(
docs/PERFORMANCE.md「R1 後」)確かめていないこと
pagehide)の書き込み。E2E は 0.5 秒後の書き込みだけを確かめている。🤖 Generated with Claude Code