feat: persist & restore per-project input mode (#14)
The input mode always started in simple; a learner who quit in advanced had to re-toggle every launch. Store the mode per-project in project.yaml (project.mode:, optional, default simple) and restore it on every open. Mode is live UI state, not schema: the worker stamps the current mode into project.yaml on every write, so a later command rewrites the live value rather than clobbering it — no db round-trip needed. The mode is persisted on unload (quit + project switch) so the mode you leave a project in is always what reopens; the `mode` command also persists immediately. A switch saves the outgoing mode, then restores the incoming project's stored mode. New --mode simple|advanced CLI flag (precedence --mode > stored > simple; combines with --resume). A teacher can ship a project that opens in advanced mode and export it to students (the mode travels in the zip). ADR-0015 Amendment 1; ADR-0003 note; help banner; requirements L1b.
This commit is contained in:
@@ -199,6 +199,11 @@ help:
|
||||
no snapshot is taken before each change
|
||||
(no per-command overhead), and undo/redo
|
||||
report that undo is turned off.
|
||||
--mode <simple|advanced>
|
||||
Start in this input mode, overriding the
|
||||
project's stored mode. Without it, the
|
||||
project's last-used mode is restored
|
||||
(default: simple).
|
||||
|
||||
App-level commands (typed inside the app, available in both modes):
|
||||
quit Exit cleanly.
|
||||
|
||||
Reference in New Issue
Block a user