Skip to content

ui: document the phone layouts and share one round glass key - #26

Closed
allozaur wants to merge 309 commits into
allozaur/feat/chat-form-expandfrom
allozaur/docs/design-system
Closed

allozaur wants to merge 309 commits into
allozaur/feat/chat-form-expandfrom
allozaur/docs/design-system

Conversation

@allozaur

@allozaur allozaur commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Overview

The design system documents how the app behaves on phones (safe areas, full-screen dialogs, the status-bar fade, alerts and page titles), and the round glass keys share one component.

Additional information

Part 8 of 15 of a work-in-progress stack on the fork, based on allozaur/feat/chat-form-expand. Its diff is only this layer.

The rest of the design system moved into the design system layer below (#22). The light-mode page colour, alerts as cards and the user bubble's hairline-only edge are gone from here: that layer already has them in a later form.

Commits (8)
  • ui: test the chat form stories against the markdown editor
  • ui: document safe areas in the design system
  • ui: document that every dialog is full screen on phones
  • ui: document the fade under the status bar on phones
  • ui: document that alerts stay small and centred on phones
  • ui: document where a phone page's title starts
  • ui: document the phone chat header and the taller top fade
  • ui: give the round glass keys one component with matte-key's blur, and document it
Testing
  • Type-check passes on this layer with no errors (one existing a11y warning in a Philosophy figure), and lint is clean.
  • Glass keys: the menu, context gauge and scroll-down keys are one GlassKey now; in a phone viewport all three render the same white glass, hairline, shadow and matte-key blur (12px with saturation; before, the Button's own 8px blur overrode it). The menu key still opens the sidebar and the gauge its panel. DESIGN.md has a Glass keys entry and Storybook a GlassKey story (Design system / Patterns), whose test passes.

Requirements

@allozaur
allozaur added this pull request to stack #30 October 31, 2026 16:46
@github-actions github-actions Bot added documentation Improvements or additions to documentation server/ui labels Oct 31, 2026
@allozaur
allozaur removed this pull request from stack #30 October 31, 2026 17:28
@allozaur
allozaur added this pull request to stack #33 October 31, 2026 17:29
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch from 8f33e0b to 9788512 Compare November 1, 2026 01:01
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch 3 times, most recently from be776c0 to a3dab1a Compare November 1, 2026 02:19
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch from 0039ee0 to 76380a7 Compare November 1, 2026 10:03
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch 2 times, most recently from 55f8354 to 5a0f1e4 Compare November 1, 2026 10:31
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch from 2969583 to 90ee050 Compare November 1, 2026 10:48
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch 2 times, most recently from 9ae372b to c321f67 Compare November 1, 2026 12:08
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch 2 times, most recently from 4e268a2 to 8a8ae80 Compare November 1, 2026 12:41
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch from c321f67 to 1fa46f6 Compare November 1, 2026 12:41
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch from 8a8ae80 to 353ad2f Compare November 1, 2026 13:05
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch 2 times, most recently from 08bbfe6 to e9bc84e Compare November 1, 2026 13:34
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch from 1e7728a to 533cb90 Compare November 1, 2026 15:56
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch 2 times, most recently from 33fbcc3 to 57f31de Compare November 1, 2026 17:11
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch 2 times, most recently from 007e0f1 to c4a4da9 Compare November 1, 2026 17:48
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch from 58fbe65 to 2137bb1 Compare November 1, 2026 17:48
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch from c4a4da9 to c46b736 Compare November 1, 2026 17:59
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch from 2137bb1 to 9504b06 Compare November 1, 2026 17:59
@allozaur
allozaur force-pushed the allozaur/feat/chat-form-expand branch from c46b736 to 67eedc6 Compare November 1, 2026 18:11
…ick it in a drawer

Assisted-by: Claude (Opus 5.5 Medium)
…phones

Assisted-by: Claude (Opus 5.5 Medium)
…o taps

Assisted-by: Claude (Opus 5.5 Medium)
…owsers

Assisted-by: Claude (Opus 5.5 Medium)
…form's

Assisted-by: Claude (Opus 5.5 Medium)
…h a haptic tap

Assisted-by: Claude (Opus 5.5 Medium)
… sidebar

Fading them out with the slide made the page flicker; the rounded frame over the
slid page already clips them at its corners.

Assisted-by: Claude (Opus 5.5 Medium)
… trigger

The phone layout opens the picker from the chat's header, so ChatForm hides the
chip there. Master's version of the chip has no such switch; bring it back.

Assisted-by: Claude (Opus 5.5 Medium)
Replace the contenteditable rich input with a CodeMirror editor that shows
the markdown source of the block being edited and renders every other block
through the MarkdownContent pipeline and stylesheet, so they match chat
messages. Plain text types exactly as before, the value stays the exact
markdown source, and mention links show as atomic badges.

The editor lives in a shared MarkdownEditor component, and the highlight.js
theme loader is shared between MarkdownContent and SyntaxHighlightedCode.
The old rich input, its tokenizer, source history and their tests go away.

Assisted-by: Claude (Opus 5.5 Medium)
The single-bundle build now includes CodeMirror and runs past Node's default
heap limit on CI runners. Raise it in the build script, so local and CI builds
behave the same on every platform.

Assisted-by: Claude (Opus 5.5 Medium)
Moving the cursor re-walked the syntax tree and rebuilt every block's
decoration. Keep the blocks with the decorations and rebuild only when the
text changes or the cursor enters another block.

Assisted-by: Claude (Opus 5.5 Medium)
The editor has no separate rich input to switch to, and its stories type into
the editor, not a textarea.

Assisted-by: Claude (Opus 5.5 Medium)
The chat form expands into a large editor once a message has markdown
beyond plain paragraphs or reaches four lines, and a Maximize button in its
top-right corner toggles it by hand. The expanded form starts around half the
screen height and grows with the text up to the space below the tabs bar,
animating its height by mirroring the editor's content height.

On a new chat the expanded form keeps the collapsed form's top edge and the
greeting only fades out, waiting for a collapse to settle before it fades
back in. In a conversation the messages follow the form as it grows, so the
latest one stays in view above it.

Assisted-by: Claude (Opus 5.5 Medium)
In the expanded editor Enter adds a line and Cmd/Ctrl+Enter sends.

On a phone the expanded form is a full-screen sheet with no corners or
border. The page around it and Safari's bars take its colour, and the
sidebar's logo button and the working-directory chip step aside while it is
open. It moves by relative offsets and a clip on the main thread, so its
edges, text, actions and chip stay in step in every engine, and its content
keeps the collapsed card's places and widths, so nothing reflows when it
settles. Expanding does not focus the editor on a phone.

On a new chat on desktop the form is lifted by its sticky bottom offset
instead of a translate, and the expanded size is built on the collapsed
card's real height, so its top edge holds still through any sequence of
quick toggles.

Assisted-by: Claude (Opus 5.5 Medium)
On a phone the menu toggle rides on the page, above the chat form: it now
fades out while the expanded form covers the screen, and comes back when
it collapses. The expanded sheet also drops the glass rim and inner ring,
so focusing the editor no longer outlines the whole screen.

Assisted-by: Claude (Opus 5.5 Medium)
The expanded chat form fills the screen on a phone, under the status bar
an installed app draws over the page. Its text now starts below the bar
(pt-safe) and its collapse button sits below it too (top-safe-2.5).

Assisted-by: Claude (Opus 5.5 Medium)
The gauge pinned to the phone's top right sat over the expanded sheet's
collapse key. Like the menu toggle across from it, it now fades out while
the expanded form covers the screen and comes back when it collapses.

Assisted-by: Claude (Opus 5.5 Medium)
…er it lands

Its position transition came back on before the browser had laid out the new position,
so it slid the form there after the fade; the drift is now 10px each way and quicker.

Assisted-by: Claude (Opus 5.5 Medium)
The design system's chat screen and form stories still checked the input as
a textarea: its value, its disabled state, and a rich input that a code span
used to swap in. The live-preview editor is a contenteditable that renders
code spans itself, so check its text and its contenteditable state instead.

Assisted-by: Claude (Opus 5.5 Medium)
Assisted-by: Claude (Opus 5.5 Medium)
Assisted-by: Claude (Opus 5.5 Medium)
Assisted-by: Claude (Opus 5.5 Medium)
Assisted-by: Claude (Opus 5.5 Medium)
Assisted-by: Claude (Opus 5.5 Medium)
Assisted-by: Claude (Opus 5.5 Medium)
…d document it

Assisted-by: Claude (Opus 5.5 Medium)
@allozaur
allozaur force-pushed the allozaur/docs/design-system branch from f8fcce0 to d61ab81 Compare November 9, 2026 12:44
@allozaur
allozaur removed this pull request from stack #42 November 9, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation server/ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant