Fix renderer scope collisions, editor bugs; add welcome screen

Bug fixes from code review:
- Wrap renderer modules (canvas/dialogs/editor/app) in IIFEs: duplicate
  top-level 'const api' across plain scripts threw a SyntaxError that
  prevented app.js from ever running (blank window), and dialogs.js/
  editor.js silently overrode each other's labeledRow/makeSelect
- Focused-view toggle now writes step.focusedView.enabled instead of a
  nonexistent flat field that the schema dropped on save
- Annotation property edits no longer rebuild the panel on every
  keystroke (focus was stolen mid-typing); debounced save instead
- flushStep/undo/redo keep this.steps in sync with stepMap so the step
  list stops going stale after the first save
- Escape now deselects the annotation; Delete remains the delete key

Welcome screen (per spec): app opens to a title at top and three
buttons at the bottom — New Capture (creates a guide, opens the editor,
starts a capture session), Existing Workspace (library), Settings.
Brand click returns to the welcome screen.

Adds an env-gated dev screenshot hook (STEPFORGE_SCREENSHOT[_JS]) used
to visually verify welcome/library/editor views under WSLg.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Iisyourdad
2026-06-10 21:29:14 -05:00
parent 4ab18080ce
commit 03bd9b0e2b
6 changed files with 198 additions and 20 deletions
+3
View File
@@ -1,5 +1,7 @@
'use strict';
(() => {
/**
* AnnotationCanvas: renders a step's working image plus its normalized
* annotation scene graph, and provides editing interactions (create, select,
@@ -500,3 +502,4 @@ class AnnotationCanvas {
}
window.AnnotationCanvas = AnnotationCanvas;
})();