Skip to content

Settings → About: name official, development, and self-host builds - #1106

Open
nedtwigg wants to merge 7 commits into
mainfrom
about
Open

nedtwigg wants to merge 7 commits into
mainfrom
about

Conversation

@nedtwigg

Copy link
Copy Markdown
Member

Adds an About topic at the end of Settings that says which build this is, and folds the Activity topic into Notifications.

What About shows

  • Official release — built by release.yml in diffplug/dormouse from tag vX.Y.Z, at that tag's commit, from a clean tree.
  • Development build — anything else, local dogfood builds included, with X.Y.Z+N, the commit, and "with uncommitted changes" when dirty.
  • Self-host build — ahead of official or not; names the one Relay it reaches and that it never updates itself. Read from the Burrow's status, since the VS Code webview is built without the relay define.
  • Web playground — on the website: simulated terminals, nothing runs locally, plus a download link.

Every kind shows version, commit, and host, with changelog/source/license/security links and a Copy details button (diagnostics including the user agent, built only on click so the settings search never indexes it).

Build stamp

scripts/build-stamp.mjs replaces generate-dor-version.mjs. A Vite plugin defines the stamp (version, commit, commits past the tag, dirty, official, host) in the Standalone, VS Code, and website bundles, and fails vite build if the define does not land. dor version and About share one buildTag; an unresolvable tag (shallow clone) now prints +? instead of reading as zero. The playground's dor version reads the same stamp.

Release behavior change: a release.yml tag run whose stamp would not be official (CHANGELOG/tag mismatch, tag ≠ HEAD, dirty tree) fails the build rather than shipping a build labelled Development forever. Simulated against a clean v1.2.0 checkout (official) and HEAD (throws); a full pnpm build plus the standalone build leave the tree clean. The first real tag push is the live test.

Spec: docs/specs/deploy.md → "Build stamp" (with rationale); the stamp never decides trust, updates, or features.

Also

  • Settings topics are now General, Notifications (speech, push, then the animation watcher and inactivity timeout), Network, Labs, About.
  • One shared CopyButton (with "Couldn't copy") for About, the one-time Copy link, and the theme debugger's Copy report.

Testing

  • scripts/build-stamp.test.mjs, lib (build-info, AboutSettings, SettingsDialog), dor version with an unknown count, and the website, standalone, and vscode-ext suites.
  • Storybook: Modals/SettingsDialog → About* stories cover each kind inline in the dialog; existing dialog snapshots will diff since the nav changed.

🤖 Generated with Claude Code

nedtwigg and others added 5 commits October 11, 2026 10:11
… and self-host builds

A shared build stamp (scripts/build-stamp.mjs, replacing generate-dor-version.mjs)
records version, commit, commits past the tag, dirty, and whether release.yml
built it from its tag; a release run that would be unofficial fails. Every
webview bundle carries it, and Settings → About shows it with the host, the
self-host Relay, links, and a Copy details button. The website playground
names itself as such and offers the download.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
About was always the dialog's last topic; its stories rendered the panel
alone on a modal card. They now open the dialog on About, priming the
build stamp through the Storybook preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…otifications

Appearance (paint brush) keeps the Theme and Shell rows. Notifications now
holds speech and push first, then the animation watcher and inactivity
timeout, each under its own rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Shell row is not appearance; General stays, with the Activity →
Notifications merge kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bake the host into the stamp instead of a PlatformAdapter field.
- dor and About share one buildTag; dor keeps an unknown tag count as +?
  rather than 0, and the playground's dor version reads the same stamp.
- One CopyButton (with Couldn't copy) for About, Copy link, and the theme
  debugger's Copy report.
- Drop the stamp shape check, installKind, --print, and the second git
  rev-parse; compute the stamp once per process and skip it under vitest.
- Share the About stories' parameters; classify About's links in the
  outbound lint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 22e46eb
Status: ✅  Deploy successful!
Preview URL: https://9ed231bd.mouseterm.pages.dev
Branch Preview URL: https://about.mouseterm.pages.dev

View logs

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a real build, searching Settings for "version" finds nothing, though the new SettingsDialog test says it finds About alone. The test renders unstamped: vitest sets VITEST, so buildStampVitePlugin skips the define and About shows Dormouse, version unknown, which is the only place the word appears. A stamped bundle shows Dormouse 1.2.0+14, a kind line, an explanation, and link labels, none of which contain "version". About doesn't match version by its group id or topic label either, so in the Standalone, VS Code, and website bundles About is hidden for what is probably its most likely search. About needs searchable text with the word in it, for example a rendered Version 1.2.0+14. The suggestion inline makes the test render a stamp, so it covers what ships.

Comment thread lib/src/components/SettingsDialog.test.tsx
A stamped build's About read "Dormouse 1.2.0+14", with no "version" to
match; it now reads "Dormouse version 1.2.0+14", and the search test
renders a stamped build as every shipped bundle is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
dormouse-bot previously approved these changes Oct 11, 2026

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build & Test fails on this head because of the new import in standalone/vite.config.ts. The standalone dev-runner tests (standalone/scripts/dev-standalone.test.mjs and its siblings) build a throwaway tree in devWorkspace in standalone/scripts/dev-fixture.mjs. That function copies vite.config.ts and scripts/relay-origin.mjs, but not scripts/build-stamp.mjs, so Vite can't load the config (run):

[UNRESOLVED_IMPORT] Could not resolve '../scripts/build-stamp.mjs' in vite.config.ts

Every test in that file fails as a result. The website suite only shows "Failed" because pnpm's fail-first run stopped it, and its own tests were passing.

Copying the module won't be enough. These tests run under node --test, so VITEST is unset and the plugin's config() calls buildStamp(). That reads CHANGELOG.md from the copied module's parent (the temp root), so the fixture also needs a CHANGELOG.md there: a copy of the real one or a one-line ## [0.0.0] stub. git fails outside a repo, and runGit already treats that as null. Because dev-fixture.mjs is outside this diff, I can't post an inline suggestion. I can push the two copyFile lines if you'd like.

@dormouse-bot
dormouse-bot dismissed their stale review October 11, 2026 18:41

CI failed — standalone dev-runner tests can't resolve scripts/build-stamp.mjs in their fixture tree.

The dev-runner tests copy vite.config.ts into a temp tree, which now
imports scripts/build-stamp.mjs. The fixture copies it, and a tree with no
CHANGELOG.md (or git) stamps as an unofficial 0.0.0 rather than throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nedtwigg

Copy link
Copy Markdown
Member Author

Fixed in 22e46eb: devWorkspace copies scripts/build-stamp.mjs, and the stamp reads a tree with no CHANGELOG.md as an unofficial 0.0.0 (git failing is already null), so no fixture changelog is needed. standalone node --test scripts/*.test.mjs passes locally (37/37).

@dormouse-bot

Copy link
Copy Markdown
Collaborator

Confirmed: Build & Test passes at 22e46eb, standalone dev-runner tests included. The missing-changelog fallback also keeps the release guard intact. On a tag run, '' reads as v0.0.0, which won't match the tag, so a release with no CHANGELOG.md still throws rather than shipping unofficial. The Argos diffs are the nav change the description already expects.

This branch is waiting to be deployed

1 waiting (outdated) deployment
hosted-preview — 9eb6e97a Waiting Oct 11, 2026 by nedtwigg via deploy #1306
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.

2 participants