Skip to content

feat: add the room revamp's components and the new prompt box - #344

Open
pratikbuilds wants to merge 46 commits into
mainfrom
room-revamp-components
Open

pratikbuilds wants to merge 46 commits into
mainfrom
room-revamp-components

Conversation

@pratikbuilds

@pratikbuilds pratikbuilds commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Why

The room revamp changes how the project room shows where a project stands, what waits on you and how you read a document (plan: Builder UI revamp). This PR builds the new parts on their own, each drawn in Storybook with its states, so they can be reviewed before #345 puts them in the room.

The one change you see in the app now is the prompt box. Today the composer has a ring that sweeps its border while work runs, a separate caution with its own buttons before you change something work has started from ("The Designer is already working from this…"), and a placeholder that names a specialist ("Ask the reviewer…"). Now it's one box with one main action: Send, the green action of whatever waits in it, or Stop while work runs. The caution becomes one grey line that says what sending restarts, and no wording names a specialist.

A plugin's own button, such as the writer's Approve, has to be able to stand where Send is. @corbits-builder/plugin-ui now lets a host draw a screen's buttons in its own row (ActionsSlot), and the writer's approval and the designer's concept choice use it.

Summary

Each new part has Storybook stories for its states in light and dark:

apps/web/src/pages/workspace/
├── project-sidebar.view.tsx   steps, files and the app's state, links at the foot
├── status-pill.tsx            one line above the box: what is happening, one action
├── chat-sheet.tsx             pull the conversation up around the box, or full screen
├── comment-card.tsx           write, keep, edit and delete a comment on a passage
├── document-contents.tsx      a written document's sections, the one being read lit
├── document-page.tsx          a written document as a printed page, notes in the margin
└── foot-fade.tsx              what scrolls under the box fades into the backdrop

The only existing part that changes in the app now is the room's composer, which is now the prompt box:

 <RoomDockView>
   <Composer>
-    working ring around the border
-    caution: "The Designer is already working from this…"  Send anyway · Cancel
+    panel        what waits: a question, an approval or a plugin screen, inside the box
+    restarts     one grey line: "Sending this restarts the design."
+    one action   Send (blue) · the waiting card's action (green) · Stop (red)
+    around       the chat sheet, handed the box
  • @corbits-builder/plugin-ui: a host can draw a screen's buttons in its own row (ActionsSlot). A boxed screen can set the placeholder and take Send. A screen's main action is green and a pick is ink, and DocumentBlock has a one-line compact form.
  • The writer's approval and the designer's concept choice use those.
  • New tokens: --rail-width, a 13px type size for controls, and colours for action, proceed and Stop.
  • The placeholder, the restart line and tool approvals no longer name a specialist.

Reading the commits

This is the first of two stacked PRs; #345 is on top of it. Together they replace #303–#306 and #335–#338 with the same code and a commit history rebuilt to read in order.

Each of the 31 commits adds one part in its final form, and no commit adds something only for a later one to take out.

  1. Tokens (3).
  2. Project sidebar and its stories (2).
  3. Status pill and its stories, and the chat sheet (3).
  4. Plugin screens in a host's row: plugin-ui, the writer and the designer (8).
  5. The prompt box: questions, tool approvals, the ports a screen uses, the box itself, then the restart line and the stories (8).
  6. Comment card, document contents and the document page, each with its stories, then the foot fade (7).

The largest commit is feat(web): make the prompt box one box that holds what waits. It changes the composer's API and its one caller in the room together, because neither compiles without the other. That commit still has the old caution, and the next one replaces it with the restart line.

Evidence

Design: Figma sections #303 · Project sidebar, #304 · Prompt box, status pill and chat, #305 · Document page, #306 · Comments.

Storybook (bun run --cwd apps/web storybook): Screens/Workspace → ProjectSidebar, StatusPill, PromptBox, ChatSheet, CommentCard, DocumentContents, DocumentPage, FootFade.

Merge Danger

Door: two-way

Most of the diff is new files. The composer is the only part of the app that changes, and a revert restores it.

Blast Radius: composer

The projects page uses the same composer, so its box gets the new look and the one action slot too. Plugin screens that use @corbits-builder/plugin-ui draw their buttons in ActionsSlot when the host has one, and in the screen as before when it doesn't.

An open project gets its own sidebar (next commits), and it should be
exactly as wide as the app's rail so that moving between the two does
not shift the page.

The width becomes one variable, --rail-width, that both read. It is
16.25rem (260px at the default text size): the design's width for the
project sidebar, wide enough for a project's name beside its mark. The
rail grows from 12.75rem to match. It is in rem, as the library sizes
its own rail, so it grows with the reader's text size.

Review: styles.css only; the rail's look is otherwise unchanged.
DESIGN.md sets controls and supporting text at 13px, between the
library's --text-xs (12px) and --text-sm (14px), and each module typed
the number itself. It becomes a token, --wb-text-control, with its own
line height (18px), named the way the library names its sizes.

Nothing reads it yet; the project sidebar is the first to.
The prompt box (later in this change) moves the room off the brand
orange for its buttons, so a press never reads as a warning or as the
logo. Three roles get their own colour, light and dark:

- --wb-action, blue: sending what the person typed, such as Send once
  there are words, and every focus ring around the box.
- --wb-proceed, green: every yes or move-forward button (Yes, go
  ahead; Approve; Continue; Use Concept B).
- --wb-destructive-foreground, white in both themes: the library's own
  turns black in dark, which made the Stop square read as a hole in a
  red dot rather than a square to press.

Each has a white foreground. The dark values are lighter so they hold
contrast on the dark box.
An open project needs one place that shows how far it has come and
what it holds. ProjectSidebarView is that place, as a component with
props only; nothing in the app renders it yet (the room integration
does that).

From the top:

- The project's name, which opens and closes the sidebar, as does
  Cmd+\ or Ctrl+\ (the platform's own modifier, so the shortcut, its
  announced keys and its title agree). The name's button is 40px with
  a 28px mark and stays put as the sidebar opens; the sidebar draws a
  hairline on its edge so the canvas beside it never runs into it.
- Plan: the plan's steps with where each stands (to do, running,
  needs you, done, failed, declined), under a heading per part only
  when the plan has more than one part.
- Files: a row per document, with the design's mockup, draft and
  concepts under it and an attached file as a row of its own. A row
  shows the typing dots while it is written or drawn, a status dot
  when it needs the person or failed, and the new-version dot on a
  ready row with a version not yet seen. The open file's row is
  marked.
- Live: whether the app is not built, starting, running, stopped or
  failed, read out as it changes, and Open app once there is an app.
  Live is marked while the app is on the page. The state gives way
  with an ellipsis before Open app does.
- At the foot, smaller and greyer, each with its icon, the links that
  leave the project: its settings and secrets, all projects and a new
  one, the workspace's settings and the account. Each group keeps its
  name for a screen reader.

Plan and Files are one tree with one tab stop, after the WAI-ARIA tree
view pattern: arrows move and fold, Home and End jump, a letter finds
the next row, Enter or Space opens a file or folds a branch, and the
row a key acts on is the one it was pressed on (focus can arrive
without a focus event when the window is not active). Folding only
changes the look, so the view holds it.

A row can have a menu: a step's holds Ask me first and, where it can
be declined, Decline, each ticked while on; a file's prints a written
document or removes an attached file, asking once more first. It
opens from a button on the hovered or focused row, Shift+F10, the
context-menu key, or Enter on a step. Focus returns to the row when it
closes, and printing waits until the menu has gone.

Closed, the sidebar leaves only the project's name over the corner and
gives the page the whole window. In a narrow room it is a drawer over
the page. The rows scroll in their own box below the name, so they
never show through it. It is as wide as the rail (--rail-width) and
uses the control type size.

Its words live in config under wording.projectShell.
One story per state worth looking at, under Screens/Workspace/
ProjectSidebar:

- Planning, Building (and dark): a project partway through, with a
  version not yet looked at and a file still being written.
- AppStarting, AppOpen, AppStopped, AppFailed (and dark), OpenApp:
  each state of the Live row, and Open app marking Live.
- NewProject: no steps, no files and no app yet.
- PlanInParts: a plan in more than one part, each part's name heading
  its steps.
- StepStates and FileStates (and dark): every mark a step or a file
  row takes.
- LongNames: long file, step and project names cut with an ellipsis.
- Closed: only the project's name, which opens the sidebar again.
- Keyboard: walks the tree with the arrows, folding and stepping out.
- StepMenu and FileMenu: a step's settings, and printing or removing a
  file, which asks once more.
- Drawer (and dark): the sidebar over the page in a narrow room.

The stories hold which steps are open and which file is on the page,
so they can be clicked through.
A pill floats just above the prompt box and says in one quiet line
what is happening now: work running, the app running, a failure, a
document ready, comments being made or done. Where there is one thing
that fits, it says what pressing it does ("Open", "Try again", "See
what changed") and does it.

While work runs, the library's thinking dots lead the line, the same
dots the chat shows; there is no progress bar. Any other state's words
already say it, so it carries no tick or dot that would repeat them.
The line is a live status, so a screen reader hears it change.

Without a press handler the pill is not a control at all, only words.
While work runs it stands where the chat's pull handle sits (a later
commit) and does the handle's job, so it takes the pull's pointer and
key handlers and says whether the chat it opens is showing.

Pill is the floating shape on its own, as a button or a plain box, so
the chat's way back in full screen can share it.
Ready, AppRunning, Failed, CommentsWorking and CommentsDone, under
Screens/Workspace/Status pill: the states that change only the pill.
Sending and working change the box as well, so the prompt box's
stories draw those beside it.

The pill's offers (Open, See what changed) are wording, so they join
config as wording.promptBox.pill, which the room reads once it shows
the pill.
Over the project view or a page, the conversation should stay one
gesture away without taking a pane of its own. ChatSheet grows up
around the prompt box to show it.

- At rest, with nothing running, a pull handle sits on the box's top
  edge. While work runs the status pill takes its place and does its
  job. A pill that offers an action of its own (Open a ready
  document) does that when pressed, so the handle stays beneath it and
  the chat never waits on the person pressing through each document.
- Dragging either up, or pressing it, opens the sheet at the
  conversation's own height. It can go full screen, where a pill at
  the top names the page the person left as the way back ("Back to
  Problem brief"). Pulling down or Escape puts it back one step.
- ArrowUp and ArrowDown open and close it as a pull would, Home and
  End go to the ends; keys move it at once, a pointer press springs.
- The sheet follows the pointer and settles on a stiff spring just
  short of critical, so a flick opens or closes it however short the
  pull, a grab mid-way keeps its speed, and it lands without wobbling.
  Past the conversation's height it gives less and less rather than
  stopping dead. One jumpy sample cannot fling it.
- The box itself never moves: the sheet reaches past it by an even
  inset, so opening the chat changes nothing about where the person
  types. The conversation is pinned to the box, so the newest line
  shows first and earlier lines fade out under the top edge rather
  than being cut. Full screen, it reads at 48rem, the chat's measure.
- Focus: if the control that had it goes away, focus goes back to the
  handle or pill, after a pressed sheet has settled (the handle is
  still in place on the first frame). A page can instead hand it the
  box's own field (returnTo), so closing the chat leaves the person
  typing where they were. The handle's focus ring is the action blue,
  as every ring by the box is.

Its words are wording.promptBox.handle and wording.promptBox.chat.
Stories follow once the room's prompt box can carry it.
The prompt box (later in this change) holds whatever waits on the
person, and its typing row should keep one main action: a screen's
buttons stand where Send does instead of in a second row under the
screen.

ActionsSlot is a context through which a host places a screen's
buttons somewhere else. ScreenActions hands both its rows (the
ordinary buttons and the "are you sure" confirmation) to the slot when
there is one, and draws them in place otherwise, so every existing
host is unchanged. React keeps the buttons in the screen's tree
wherever they land, so the screen's keys and focus still reach them.
The ordinary row is marked data-slot="screen-buttons" so a host can
lay it out.

Cancel in ScreenRow becomes optional (null) for hosts that offer their
own way out, such as typing in the prompt box.
When the room gives a plugin screen a row to draw its buttons in (the
prompt box's typing row), screenHost passes it on through ActionsSlot,
and leaves Cancel out: in the box, typing is the way out.

While an answer is on its way the whole screen is inert. Buttons drawn
in the host's row sit outside that hold, so they are wrapped in the
same inert box there and wait with the screen.

Without a row nothing changes: the screen keeps its buttons and its
Cancel under it, as in the conversation today.
A screen in the prompt box shares the box with the person's words, so
it needs a say in what the box invites and in what Send does. Three
contexts carry that, each null where the screen is not in the box so
other hosts are unaffected:

- PromptPlaceholder, with usePromptPlaceholder: the screen sets the
  box's placeholder while it is shown, such as "Add details for
  Concept B…" once an option is picked, and gives it back after.
- PromptSend, with usePromptSend: the screen takes the words the
  person sends, so words typed after a pick go with the pick rather
  than replacing it as a reply. The taker answers whether it took
  them; the host sends as usual when it did not. The host keeps one
  taker for as long as the screen offers one and always calls the
  screen's latest.
- PromptAction: where a screen that covers the page, with the box
  still beneath it, draws its one forward action, so it stands where
  Send does instead of in a second row.

The designer's picker and the questions card are the first to use
them, in the commits that follow.
A screen's main action (Approve, Continue, Use this concept) moves the
work forward, so it takes the proceed green wherever it stands, in the
conversation or in the prompt box, rather than the brand orange. The
library's Button names its variant only in its classes, so the rule
matches its bg-primary class inside a screen's button row. Hover
darkens it toward the ink.

A pick in a comparison (the chosen item's border and its radio) is
marked in ink, never the brand colour, so it reads as chosen rather
than as a call to act.
A card that already says what it asks, such as the approval in the
prompt box, needs each document as one line that opens it, not the
full block with its summary. That line is still the document block,
so DocumentBlock takes `compact` rather than living beside it as a
second component; the props are a union, so a compact block takes no
summary.

The compact line is one button: a quiet file mark, the title, "Version
2" and any note, then Open with its icon. The whole line opens the
document, and it is named by what it shows, Open included, so a spoken
"Open" or the title reaches it. It sits on the muted fill, which shows
against the box in both themes (the page ground is the box's own black
in dark), and its focus ring is the action blue.

The test that every block has exactly one way in, and that it opens
its own document, now covers the one-line shape too.
The approval reads as one short card, in the conversation or in the
prompt box:

- It asks "Ready to approve the build plan?" (or "these 3 documents").
- A lone document's own summary follows, held to its first line; with
  several, each speaks through its own line instead.
- Each document is a compact DocumentBlock that opens it, set close
  together.
- The note pointing at the message box goes. The box's placeholder,
  "Or type what should change…", says it where the person types.
The concept picker covers the page with the prompt box still under it,
so it should not draw a second forward action beside Send, and words
typed after a pick should not be lost.

- The forward button names what it does: "Choose this design" until
  something is picked, then "Use Crisp", disabled until the pick can
  be used.
- With the box beneath it (PromptAction), the button stands where Send
  does, and only once it can be used; until then the box's own Send
  waits. Elsewhere it stays in the screen's own row.
- Once a concept is picked the box asks "Add details for Crisp…", and
  words sent from it go with the pick as a comment on that concept
  (PromptSend), next to any comments already left.
- With nothing picked, the box asks "Or request a different design…".
The interface says what is happening, not which agent is doing it.
Two places still addressed a role by name:

- The prompt box's placeholder while work ran asked the person to
  "Ask the reviewer…". It now asks for a reply as it does otherwise
  ("What do you want to say…"); work under way, whether working or
  only starting, still beats a running app and a failure.
- A tool approval read "Let the specialist use run shell on bun run
  build?". It now asks "Allow run shell on bun run build?".

The placeholder's tests say the same: work under way names no one.
QuestionsCard takes place="box" for when it waits inside the prompt
box rather than in the conversation. In the conversation the card is
as it was, apart from its colours (below).

In the box:

- One question at a time, titled by the question, with Back as an
  arrow beside "2 of 3" when there are several. The thread of earlier
  answers and Cancel are left out; the person's own words are the way
  out.
- Nothing starts picked. The coordinator's recommendation is a tag
  ("Recommended") beside its option rather than part of its label,
  and a pick only selects, so the person can add details before
  moving on.
- Choices are rail rows: a pick is marked by a blue rail and darker
  words, with no numbered box.
- Continue stands where Send does (through ActionsSlot) once something
  is picked, and reads Continue on the last question too: the box is
  one step of a flow, and its tooltip says that this step sends.
  Until then the box's own Send waits.
- The box's placeholder follows the card (usePromptPlaceholder): "Or
  type your own answer…" with nothing picked, "Add details for Small
  teams…" once something is.
- Words sent from the box (usePromptSend) are details that go with the
  pick, or the person's own answer where the question takes one, and
  then the card moves on as Continue does. withWords decides which;
  answerLabels sends options, own words, then details. Saved progress
  keeps the details across a reload.

In both places:

- A pick-any question's rows are rail rows too, with the native
  checkbox kept (visually hidden) for keys and screen readers, in
  place of the library's orange checkbox and its orange ring.
- Continue and Send answers take the proceed green.
- Where the host draws the buttons elsewhere they are wrapped in the
  card's inert hold, and the footer leaves no rule behind.

Tests cover the boxed card's first render (nothing picked, the tag, no
own-words row) and withWords for details and own answers.
DocumentDecision takes place="box" for an open approval that waits
inside the prompt box. The library's approval card keeps its buttons
inside it, so in the box the decision draws the ask itself:

- The ask heads the card, with Not yet beside it as a quiet pill.
- What would run sits beneath. Only a shell run's subject is a command
  line, so only it shows as one ("Allow this command to run?" over a
  "$ bun run build" line, the prompt not copied with it); any other
  tool asks by its name and says plainly what it would touch, so
  writing a file never looks like running one. runsShell in
  collaboration.ts tells them apart.
- Yes, go ahead stands where Send does (through ActionsSlot), inert
  with the card while a decision is on its way. The countdown of a
  typed yes and any error keep their place in the card.
- The box's placeholder while an approval is open becomes "Or say what
  to do instead…".

The prompt sign is wording, so it lives in config with the ask. In the
conversation the card is the library's as before, but its Yes takes
the proceed green rather than the brand orange.
A screen can be drawn in two places relative to the prompt box: as the
card waiting inside it, or covering the page above it. Either way it
has to reach the box's typing row, its placeholder and what Send
sends. useBoxPorts holds those for one box:

- the typing row's slot (set once the box has drawn it), into which
  buttons are portalled;
- the placeholder a screen asks for, while it asks;
- the taker for the words Send sends, while a screen offers one (a
  function held in state, so it is set through an updater).

InBox connects what it wraps to the box through the plugin-ui
contexts. As the card in the box it hands over its whole row of
buttons (ActionsSlot); as the page over the box it hands over only its
forward action (PromptAction), since its way back stays with the page.
Both set the placeholder and can take Send. With `as` null nothing is
connected.

The room's prompt box is the first user, in the next commit.
The room's composer becomes the prompt box: one rounded box with
whatever waits on the person inside it, above one typing row with one
main action. This is the first commit that changes what the room
looks like.

Composer (composer.tsx, used by the room and the projects page):

- It takes `panel`, what waits on the person, drawn inside the box
  above the typing row. A question card, a plugin's screen or an
  approval drops its own frame there and takes the box's width; a
  screen keeps the box's inset and its heading reads at the words'
  size. The question's rail runs on into the typing row with no rule.
- It takes `around`, what grows around the box without moving it,
  handed the box: the room passes the chat sheet.
- `working` and the ring that swept the border while work ran go; the
  status pill says work is running. The ring's keyframes leave
  styles.css.

The typing row (RoomComposerView in room.view.tsx):

- Attach leads as a round plus on a muted fill, in place of the
  paperclip; comments waiting to be made ride beside it as a token
  ("3 comments") with "Add a message…" as the placeholder, and Send
  makes them with or without words.
- The end of the row holds one thing. Send is muted while there is
  nothing to send and the action blue once there is. While something
  waits and nothing is typed, its buttons stand there instead (the
  composer-actions slot, filled through the box ports), in the
  proceed green; typing brings Send back, and the slot is only hidden
  so its buttons keep their place and focus. While work runs and the
  box is empty, Stop stands there in red.
- While a message is on its way only Send waits: the box, its words
  and the mic stay usable so the person can start the next one.
- The box keeps its plain edge with focus; the caret says where the
  words go, and focus rings inside it are the action blue. Enable AI
  and every other main action in the box are never orange.
- Words sent while a screen offers to take them (a pick in the box or
  over the page) go to the screen first.

The room (RoomView):

- RoomDockView is exported, so stories can draw the dock's states,
  and takes what waits, the chat for the sheet and where the sheet
  starts. The room's own conversation already shows the thread, so
  its box never gets a sheet to pull up; the box under a page or the
  project view does, from the new optional `chat` slot. Without it no
  box has a handle, and the room does not fill it yet. The box is
  always wrapped in the sheet, even with nothing to pull up, so it is
  never remounted and never loses the cursor when work starts and the
  pill appears.
- A screen over the page shares the box's ports, so its forward
  action, placeholder and Send reach the box beneath it.
- The plugin screens under the conversation are now `chatScreens`;
  `chat` is the conversation for the sheet.
- The chat taken full screen hides the page or project view it was
  pulled over (kept mounted), and Escape puts an open sheet back
  before it closes the project view.

The composer's new props (status, comments, onStop) are optional, and
the room model does not set them yet, so in the app the box shows no
pill, token or Stop until the room integration does. The warning before changing an
earlier document still asks for a second yes under the box; the next
commit replaces it.
Words that name a document work already builds from used to stop the
send and ask for a second yes ("The Designer is already working from
this…" with Send anyway and Cancel). That named who does the work and
put a decision between the person and Send.

Now, as the words are typed, one grey line inside the prompt box,
just above the typing row, says what sending would restart: "Sending
this restarts the design." Send sends straight away.

- The work is named by what it files (the design, the build, the
  presentation), never by who does it, and "work that has started"
  covers anything else (restartedWork in earlier-document.ts).
- The room works the line out from the words as typed (no read of who
  is at work means nothing to say), so there is no caution state to
  hold or clear.
- The line sits after anything else waiting in the box, nearest the
  words it is about, with no rule under it. It is a status, not an
  alert.
- The room story for it shows the line rather than the old warning.
Every state of the room's dock, drawn with RoomDockView under
Screens/Workspace/Prompt box, so the box can be reviewed without
running a room. prompt-box.fixtures.ts holds the resting composer the
stories (and the chat sheet's) start from.

- The row: Resting, Typing, Sending, Working (Stop in red, the pill
  above), TypingWhileWorking.
- A question in the box: Question, QuestionLater (Back beside "2 of
  3"), QuestionPicked (Continue where Send is, the box asking for
  details), QuestionPickAny, QuestionPickedWithDetails, and
  QuestionOwnAnswer (Send comes back, blue).
- ApproveDocuments and ApproveDocumentsTyping: the writer's approval
  with its document lines, and typing what should change instead.
- ToolApproval, ToolApprovalOtherTool and ToolApprovalTyping: a shell
  run as a command line, any other tool by its name, and typing what
  to do instead.
- ChangingEarlierDocument: the line saying what sending restarts.
- CommentsWaiting: the comments token and its placeholder.
- LongText, Narrow and Keyboard (Enter sends, Shift+Enter starts a new
  line).
- Dark versions of the resting box and of each waiting card.
The picker's existing stories now expect the forward button to name
the pick ("Use Crisp" once Crisp is picked), and say what Open and
Chosen show.

Two new stories put the picker over the page with the prompt box
beneath it, sharing the box's ports as the room does:

- OverTheBoxNothingPicked: the box asks for a different design if none
  fits and its Send waits; there is no second forward button.
- OverTheBoxPicked: "Use Crisp", green, stands where Send does, and the
  box asks for details to go with it.
The sheet around the room's prompt box, under Screens/Workspace/Chat
sheet. The stories sit in the room's own page, whose rule hides the
document while the chat is full screen, and name that page on the
way back.

- NothingRunning: only the handle above the box.
- PullingUp and MidPull: a pull held part way, the newest line first
  and earlier lines fading under the top edge rather than cut.
- ChatOpen and FullScreen: open at the conversation's height, and full
  screen with only the way back, naming the page left.
- EscapeCloses and PressToOpen: interaction stories that put the chat
  back with Escape, and open it from the pill and close it from the
  handle.
- HandleFocused: the handle's ring is the action blue.
- ReadyWithChat: a pill that opens a ready document keeps the handle
  beneath it.
- Narrow: the even inset at phone width.
- Handle: the handle at rest and while held.
- Dark versions of the resting, open, focused and ready states.
A comment sits beside the passage of a written document it is about,
in the page's margin or opened from the passage on its own. Comments
collect as drafts in the browser until the person sends them with
their next message, so the card has two states: writing and saved.

- Writing: a field that starts focused, with its send waiting for
  words. Once the words wrap, the send drops beneath them and stays
  there until the field is cleared, so a draft on the edge of one line
  does not flip between layouts. A long draft grows a line at a time,
  then scrolls.
- Saved: the words, with edit and delete, reachable by Tab, until the
  comment is sent. Every comment is the person's own, so there is no
  name or avatar: the box is the comment.
- A save on its way, and one that failed ("Your comment was not saved.
  Try again."), with the words kept.
- Enter saves, Shift+Enter starts a new line, Escape cancels. An Enter
  that ends an input-method composition is left alone, including
  Safari's, which reports it with isComposing already false
  (commentKey, with tests).
- Saving or cancelling removes the field that had focus, so the card
  keeps it and Tab carries on from there. A deleted card fades out,
  inert so a second press cannot remove it twice, and comes back if
  its parent keeps it.

Its words are wording.comments. Nothing renders it yet.
Under Screens/Workspace/Comment card:

- Writing and WritingEmpty: level with the passage, ready to type; a
  new comment's send waits for words.
- Saved, LongComment, LongDraft: a draft that waits for the others,
  and long words wrapping in the card and growing the field.
- Saving and SaveFailed: on its way, and failed with the words kept.
- EnterSaves, EscapeCancels, KeyboardFocus: interaction stories for
  the keys, and Tab reaching edit and delete.
- Interactive: write, save, edit and delete in one card.
- AllStates: every state side by side, as the design lays them out.
- WritingDark and SavedDark.
A written document read as a page (next commit) needs a way to see
its shape and jump about it. DocumentContents lists the document's
name, then each section under a thin rail:

- The section being read is lifted onto the page colour.
- A section someone has commented on carries a comment mark, named
  "Has comments" for a screen reader.
- Pressing a section jumps to it.

It is a navigation landmark named "Sections of this document". Its
words start wording.documentViewer, which the page adds to.
WithComments (two sections carry comments, the one being read is
lifted) and AtTheTop (no section open yet), under Screens/Workspace/
Document contents.
DocumentPage reads a written document as a printed sheet on the
window's backdrop, in place of a document scrolled in a pane. Nothing
renders it yet; the room integration puts written documents on it.

The page:

- A small running header with the project's name and, opposite it,
  the filing date or how the writing stands ("Writing · Version 3"),
  then the title and the body at the page's type scale.
- 768px wide, as wide as the conversation's turns. Below its own width
  the height is a minimum worked out from the width (one A4 page), and
  the sheet grows past it, so a longer text never runs off its foot.
- While the document is written the header says so; if writing stops
  before the end, a note marks where, with the way to start again.

Around it:

- The pane's bar heads it with the version and the bar's own groups,
  and between them the page being read ("Page 2 of 5", counted as A4
  at the sheet's width) and the zoom (out, the readout that resets to
  100%, in).
- The contents stand against the page's left edge, as the margin's
  cards stand against its right, and give way below a 1120px view.
  The section read is the last whose heading reached where a jump
  lands it, or at the foot of a long document the last heading in
  view (sectionRead, with tests). A section chosen in the contents
  stays lit while the page travels to it and until the person scrolls
  on; their own wheel, touch or scroll key ends the jump at once.
  Scrolling is smooth unless the person asks for less motion.

Passages:

- A passage something is said about is underlined (the CSS highlight
  API, one registry for every page on screen), saved or selected while
  its comment is written. Quotes are found across inline elements in
  one pass over the page's text.
- The right margin holds what the caller places beside a passage,
  level with it; items too close to fit stack below one another in
  page order, measured in one layout, and one that grows moves the
  ones below.
- With no room for the margin's cards, a press on an underline opens
  its card under the line, or above it where the view ends first. A
  hidden button per passage does the same from the keyboard
  ("Comment on “…”"); the card then takes focus, so Escape hands it
  back. Scrolling closes it.

Its words complete wording.documentViewer.
A Problem brief on the page, under Screens/Workspace/Document page,
with the pane's real bar and version menu:

- Filed: two commented passages, their notes level with them in the
  margin.
- PassageStates (and dark): a saved passage and one selected while
  its comment is written.
- ZoomedOut: the page below 100%.
- Writing and WritingStopped: the header while the document is
  written, and the note where writing stopped with the way to start
  it again.
- LongScrolled: several pages, scrolled part way, the bar counting the
  page being read.
- NoSections: the contents name the document alone.
- Dark.
The document page scrolls under the prompt box, which floats over it.
FootFade blends the view into the backdrop at its foot, so the box
reads clearly over whatever passes beneath it. It covers the foot of
its nearest positioned parent, is hidden from screen readers, and
takes no presses, so it never stands in the way of what is under it.

UnderThePromptBox, under Screens/Workspace/Foot fade, draws it with
the document page running on under the room's box.
@corbits-triage

corbits-triage Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Approve held: code review did not report on this head.

Changed since the last verdict (Fail at 73b2235): 2 new commits.

The plan reads as a list of steps rather than a checklist. A step's
state lives on its row: its name in full while it runs or needs the
person, faint while it waits, and a running step's name shimmers
beside a small drawn ring. A step that pauses for the person first
carries a pause mark, and a skipped one says so. Its menu gives verbs
for what choosing them will do, Pause before this step or Skip this
step, in place of switches.

Files are gone from the sidebar. The app's state is one line under the
plan, App running or App failed to start, which opens the app. The
closed sidebar leaves only its toggle on the page, and the rail is
14rem, down from 16.25rem.

The stories draw planning, building, each app state, long names, a
long plan, a folded plan, the step menus, the drawer and dark mode.
Putting the chat back used to run in steps: the sheet sank onto the
box, sat there as an empty frame, stepped 15px and only then faded.
The sheet's edge is now a layer of its own whose opacity follows the
sheet's height, so it leaves as the sheet lands and comes in as it
sets off. The spring is critically damped and stiffer, settling in
about 330ms without a slow creep, and works in small fixed steps so a
slow frame cannot make it overshoot. A status pill rides with the
sheet and hands over to its handle, and neither steps as the sheet
sets off or lands.

What a motion leaves on the elements is cleared in the same commit as
the state it lands in. Cleared any sooner, one frame was painted
between the two: the sheet without its edge at the end of opening, or
the whole conversation back at full height at the end of closing.

Going to full screen and back is a view transition rather than a cut:
the edge travels to its new place while the page under it fades, and
the box and the newest lines stay where they are. Full screen keeps
the conversation by the box, as it sits in the sheet, and keeps the
sheet's exact width so nothing rewraps. From the keyboard it still
changes at once.

Three stories looked for the chat while the room's page was still
fading in as it mounted, and failed when they looked too soon; they
now wait for it.
@pratikbuilds pratikbuilds changed the title feat(web): build the room revamp's parts and make the composer the prompt box feat: add the room revamp's parts and make the composer the prompt box Nov 23, 2026
@pratikbuilds pratikbuilds changed the title feat: add the room revamp's parts and make the composer the prompt box feat: add the room revamp's components and the new prompt box Nov 23, 2026
pratikbuilds and others added 12 commits November 23, 2026 18:19
A running step, the folded Plan and a starting app both shimmered their
words and turned a spinner, two loops for one state that run as long as
the work does. The shimmer moved a background through the text, which
repaints every frame. The spinner already stands in the column every
row's mark uses, so it says the state on its own.
The full-page screen, the question card, the comment card and the
comment opened from its passage each typed their own durations and
curves, some of them the weaker keyword ease-out. They now use the
library's --duration-micro, --duration-standard and --ease-out, so they
keep pace with the box and the chat sheet. A comment's exit reads the
same values off the page, as it is animated from script.
Every comment card settled in as it mounted, so a document's comments
would all arrive together each time it opened. Only a card that first
shows as a field, a comment just started, settles in now. A card opened
from its passage is brought in by the popover around it, so it does not
move a second time.
On a narrow page the card opened from an underline only faded in, with
nothing to say where it came from. It now grows from 97% at the corner
nearest its passage: down from the line, or up when it opens above it.
The edge travels across the screen going full screen and back, and with
the strong ease-out it covered most of the way at once and drifted the
rest. It now eases in and out, and its corners and lift change in step.
--wb-ease-in-out is the app's curve for travel, which the library does
not have.
The speed handed to the spring came from the last two pointer moves,
which can jump, and a flick had to reach 0.3 px/ms to count. It is now
the speed over the last 80ms, a flick counts from 0.11 px/ms, and a
pull held still before letting go hands on no speed.
A question, an approval or a plugin's screen appeared in the box at
once, and the box's top edge jumped up with it. It now fades in and
rises 6px. It leaves at once: answering is the person's own move.
Send's fill faded to Stop's red while its mark swapped under it, which
read as a flicker. The mark now fades in from 80% with the fill.
Resolves screen-actions.tsx: keeps this branch's row that a host can
draw in its own place, and adds main's declines, so a view whose own
button says no still leaves Cancel out.
Triage flags promise chains. The chat sheet caught every error from its
view transition and cleared its markers with finally. The comment card
settled with then. Each is now a named async function.

A transition skipped by another or by a hidden tab is still ignored, as
is a fade cut short. Any other error is now raised, not swallowed.
Triage flags invented empty fallbacks. Text nodes always hold a string,
so the page reads their data in place of textContent ?? "". Headings
with no text are left out of the contents rather than listed blank.
Browsers report a computed scroll margin as a length, so it needs no
|| 0. Details join an answer only when there are some. The stories take
the composer's placeholder and name the restarted work directly.
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