Skip to content

[M11] Start dialog that writes the snippet (M11.8) - #97

Merged
ssoufii merged 2 commits into
mainfrom
auto/m11.8-start-dialog-snippet
Nov 17, 2026
Merged

ssoufii merged 2 commits into
mainfrom
auto/m11.8-start-dialog-snippet

Conversation

@ssoufii

@ssoufii ssoufii commented Nov 17, 2026

Copy link
Copy Markdown
Owner

The page now ends with the start section from docs/FRONTEND_DESIGN.md section 6: the closing line "start writing." beside an open "new database" dialog (440px, data-ui, the one shadow on the page, via a new --shadow-dialog token).

How the snippet is kept honest

  • web/src/data/snippets.json holds the one template. The page fills it in with JSON.stringify (web/src/data/snippet.ts), and tests/test_snippets.py fills it in the same way with json.dumps and executes it against the real engine. JSON string syntax is valid Python, so a directory with quotes or backslashes is quoted, not spliced.
  • The call is laid out one argument per line so it reads whole inside the 440px dialog at every width; I checked screenshots at 1440 and 390.

Acceptance criteria

  • Start section as section 6 describes: editable directory field, segmented fsync choice (radio group, arrow keys), "copy the code" button, beside the closing line
  • The snippet uses the real constructor and parameter names; pytest runs the snippet for every fsync choice (and checks the dialog's choices equal FsyncPolicy)
  • Copying shows "copied" for 1.5 s and works by keyboard; a link goes to the GitHub repository
  • Playwright: changing the directory and the fsync choice changes the snippet; the copy button writes the snippet to the clipboard

Verified locally (macOS)

  • pytest: 1264 passed, 6 skipped (the existing /proc descriptor tests, which skip on macOS). ruff check and ruff format --check are clean.
  • npm run lint, typecheck, build: clean.
  • npx playwright test: 102 passed, 2 failed. The failures are the existing console.spec.ts "whole flow works by keyboard alone" test in both projects. It presses Control+A, which doesn't select all on macOS, so it fails on a Mac and passes on Linux CI. It was not touched here.
  • New start.spec.ts: 18 passed in both projects. It includes the house-rules audit at 1440, 768 and 390.

Built by hand in a local session, not by the pipeline routine.

Closes #86

🤖 Generated with Claude Code

https://claude.ai/code/session_01QWNkuQ7vhXw8ijQ3q3NZDG

ssoufii and others added 2 commits November 17, 2026 00:33
Story M11.8. The page ends with an open "new database" dialog: an editable
directory, a segmented fsync choice and a "copy the code" button that copies
a snippet built from web/src/data/snippets.json. tests/test_snippets.py fills
in the same template and executes it against the engine for every fsync
policy, including a directory name with quotes and backslashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWNkuQ7vhXw8ijQ3q3NZDG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWNkuQ7vhXw8ijQ3q3NZDG
@ssoufii
ssoufii merged commit cf3545c into main Nov 17, 2026
9 checks passed
@ssoufii
ssoufii deleted the auto/m11.8-start-dialog-snippet branch November 17, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M11] Start dialog that writes the snippet (M11.8)

1 participant