Skip to content

docs(design): describe the Door as the two-button group it is - #595

Merged
nedtwigg merged 2 commits into
mainfrom
docs/design-doors-current
Sep 8, 2026
Merged

docs(design): describe the Door as the two-button group it is#595
nedtwigg merged 2 commits into
mainfrom
docs/design-doors-current

Conversation

@dormouse-bot

@dormouse-bot dormouse-bot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

DESIGN.md §5 Doors still describes the Door as it was before the notepad and browser-Surface work landed, so the one file AGENTS.md tells you to read before touching any text-*/bg-* class on a Door is wrong about that component's structure. This updates the three stale bullets to match lib/src/components/Door.tsx.

Three claims that no longer hold:

  • "The whole door is a button." Since the notepad work, the door is a labelled role="group" wrapper holding one or two buttons — the title button reattaches and starts the drag, the notepad button does neither. docs/specs/notepad.md → Notepad UI already states this correctly ("A Door is a wrapper carrying data-door-id with one or two buttons"), so DESIGN.md was the side that drifted; the new text points at that spec rather than restating its rule.
  • "horizontal padding px-2.5 (10px)". The padding moved onto the inner buttons and now varies: the title button is pl-2.5 with pr-2.5 alone or pr-1 when the notepad button follows, and the notepad button carries pl-0.5 pr-2.
  • Content list. It omitted the leading browser-display icon cluster and the trailing notepad button, both of which a Door renders today.

Also notes that the notepad button is the only part of a Door taking the standard hover:bg-current/10 wash — the "no decorative hover" rule still holds for the door itself.

No test: this is a documentation-only change, and DESIGN.md carries no lint beyond the generic ones. Full pnpm test is green on the branch head.

Evidence

Door.tsx at 61dbd293 — outer element is role="group" with data-door-id; the title <button> has pl-2.5 plus showNotepad ? 'pr-1' : 'pr-2.5'; the notepad <button> has pl-0.5 pr-2 hover:bg-current/10; BrowserDisplayIcon renders ahead of the title.

BrowserDisplayIcon in lib/src/components/wall/BrowserDisplayIcon.tsx is a two-glyph cluster, not one glyph: an inline-flex gap-0.5 span holding AgentRobotIcon plus the mode's presentation glyph, with the robot dropped for iframe alone. The Content bullet says so.

Timeline: the Door's notepad button landed 2026-09-04 (2d0945a3, 61dbd293) and the browser-display cluster 2026-09-03 (c7fa07d4); DESIGN.md's last edit is 2026-09-05 (c4d0b2b1) and touched other sections only, so the Doors entry was never carried forward.

The components.door front-matter token (padding: "0 10px") is left alone — it is the nominal design token for the component, not a per-button inventory, and changing it looked like overreach for a doc-accuracy fix.

The second commit on this branch folds in the two findings this PR's own draft review raised: "glyph" singular understated the icon cluster, and the first draft of the Dimensions bullet wrongly claimed the notepad button leaves the door's width unchanged (it adds roughly 22px unless max-w-[220px] truncates the title instead), so that clause is gone.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 8, 2026

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1b7d2f2
Status: ✅  Deploy successful!
Preview URL: https://e89b548b.mouseterm.pages.dev
Branch Preview URL: https://docs-design-doors-current.mouseterm.pages.dev

View logs

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewing as a draft — flagging anything that looks worth a quick fix. Mark ready for a full review.

Both findings are on the two rewritten bullets; the role="group" / hover rewrite and the notepad-button description check out against Door.tsx, as do the two spec headings the new text points at.

Comment thread DESIGN.md Outdated
Comment thread DESIGN.md Outdated
…claim

The leading browser-display icon is a pair (wide robot + presentation
glyph, gap-0.5), with the robot dropped only for iframe, so 'glyph'
singular understated the leading content. The Dimensions bullet also
claimed the notepad button leaves the door's width unchanged; it adds
~22px unless max-w-[220px] truncates the title instead.
@nedtwigg
nedtwigg marked this pull request as ready for review September 8, 2026 21:55
@nedtwigg
nedtwigg merged commit 2fcc2f7 into main Sep 8, 2026
14 checks passed
@nedtwigg
nedtwigg deleted the docs/design-doors-current branch September 8, 2026 21:56
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