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
+49
View File
@@ -671,3 +671,52 @@ fieldset legend {
border-top: 1px solid var(--border);
}
/* ---------- welcome screen ---------- */
#welcome-host { flex: 1; min-height: 0; display: flex; }
.welcome {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
padding: 9vh 32px 7vh;
}
.welcome-title { text-align: center; }
.welcome-title h1 {
margin: 0 0 10px;
font-size: 44px;
font-weight: 700;
letter-spacing: -0.015em;
}
.welcome-title p { font-size: 14px; margin: 0; }
.welcome-actions {
margin-top: auto;
display: flex;
gap: 18px;
width: min(880px, 100%);
}
.welcome-btn {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
padding: 26px 18px;
border-radius: var(--radius);
border: 1px solid var(--border);
background: var(--panel);
box-shadow: var(--shadow);
cursor: pointer;
}
.welcome-btn:hover {
border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
transform: translateY(-2px);
}
.welcome-btn.primary {
background: var(--accent);
border-color: var(--accent);
}
.welcome-btn.primary .welcome-btn-label,
.welcome-btn.primary .welcome-btn-hint { color: var(--accent-fg); }
.welcome-btn-label { font-size: 16px; font-weight: 650; }
.welcome-btn-hint { font-size: 12px; color: var(--muted); }