Skip to content

feat(web): move what waits on the person into the prompt box, with the status pill and plugin space - #336

Closed
pratikbuilds wants to merge 17 commits into
room-sidebarfrom
room-prompt-box
Closed

pratikbuilds wants to merge 17 commits into
room-sidebarfrom
room-prompt-box

Conversation

@pratikbuilds

Copy link
Copy Markdown
Contributor

PR 2 of 5 in the room revamp. Base: #335 (PR 1). By the plan it needs only #303–#306; it's stacked on PR 1 to keep one line of history. Plan: Builder UI revamp, section "PR 2: what waits on you leaves the chat".

What changed

What waits on the person leaves the conversation for the prompt box from #304, one thing at a time, and every plugin screen opens in a plugin space beside the main area.

 <Room>
   <ProjectSidebarView>
   <Conversation>
-    question, approval and plugin cards in the thread
-    <NextStepLine>
+  <PluginSpace>                  a column, or a sheet below 900px
   <PromptBox>
+    <StatusPill>                 one line, one action
+    waiting card: question → approval → step to go ahead → plugin screen → send warning
+    Stop, only while a specialist runs
-  question over the whole room
  • waiting.ts: what waits on the person, and in what order. room-status.ts: what the one status line says and its one action, first rule that fits. Both are plain logic files with tests and sample projects.
  • prompt-box.model.ts reads the hub and gives the box its card, the pill its line and the space its screen.
  • Removed: the open cards in the thread (including the questions card's conversation layout), plugin screens in the chat and over the room, the chatScreens slot, plugin tabs, the whole-room question, the next-step line, and PR 1's Go ahead in the sidebar step menu.

What behaves differently

  • A question, an approval or a step waiting for Go ahead shows in the box, with its forward action (green) where Send is. Typing brings Send (blue) back.
  • Sending while a question is open answers it; sending while an approval is open declines it.
  • On a wide window the plugin space appears when a screen comes in, without moving you or taking focus. The box lists the screen with Open, which focuses the screen's heading.
  • Below 900px, Open brings the screen up as a sheet; Close puts it away with the screen still waiting, and the cursor returns to the box.
  • After a screen is submitted, the next one takes its place or the space closes, and the cursor goes back to the box with any half-typed words kept.
  • Stop shows only while a specialist run is going; the coordinator's own turn can't be stopped.
  • The page and the box stay on the window's midline when the plugin space is open.

Design

Figma: Decided, 20 Nov and the #304 section.

How to test

Run it: check out room-prompt-box, bun install, bun run dev, bun run dev:seed -- --fixture=habit-tracker --stage=planning --no-approve. A model provider must be connected in Settings, or no coordinator turn runs.

  1. The next-step line is gone; the status pill above the box says what's happening, with at most one button.
  2. Start a new project and answer the coordinator's questions: each question shows in the box with its rows; picking one shows green Continue; typing your own answer shows blue Send. ‹ goes back a question.
  3. Leave an approval waiting: the box shows it with green Approve. Typing a change shows Send, and sending declines the approval.
  4. Set a step to Ask me first from its sidebar menu: when it's reached, the box shows the step with Go ahead, and the sidebar menu no longer has Go ahead.
  5. When a plugin screen comes in (for example choosing a design), it opens in the plugin space on the right, and the box lists it with Open. Open focuses the screen's heading. Submit it: focus is back in the box.
  6. Narrow the window under 900px and repeat 5: Open shows a sheet; Close keeps the screen waiting.
  7. While a specialist runs, Send turns into red Stop; Stop ends the run. While only the coordinator is thinking, there's no Stop.
  8. Type half a message, then do 2–5: the half-typed text stays.
  9. Repeat 2, 3 and 5 in dark mode.

Storybook: Screens/Workspace/Room → QuestionsOpen, ApprovalWaiting, StepGoAhead, ScreenWaiting, ScreenWaitingNarrow, ScreenSheetNarrow, SpecialistWorking, WorkFailed and their Dark versions.

How it was verified

  • Lint, format, typecheck, boundaries, and bun --conditions=intx-src test ./apps/web/src ./packages: 290 pass. The 81 room, sidebar and prompt-box stories pass their play tests.
  • In Storybook: the plugin column with the screen's action in the box; the narrow sheet (Open, heading focus, Close, focus back); the question rows in the box; the step card in dark.
  • On a local hub: the pill and its Open, the next-step line and plugin tabs gone, the floating bar clear of the pill.

Not exercised

The local hub's model provider was signed out, so none of these were seen live, only in Storybook and tests: a question or approval in the box and sending over them, a step waiting for Go ahead, a plugin screen in the space (wide or narrow), focus after submitting a real screen, Stop during a specialist run, and the pill while sending, thinking or after a failure.

Open items: a package approval in the box is still the library card with its own buttons; the hub's next_step_line preference is now unused (removing it is a hub change); clicking an already-picked option no longer re-picks it.

@corbits-triage

corbits-triage Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Triage: Fail

@pratikbuilds, please address the following:

  • added code matches a code pattern: apps/web/src/pages/workspace/prompt-box.model.ts:180-225 iife: Immediately invoked function; name the function., apps/web/src/pages/workspace/prompt-box.model.ts:228-258 iife: Immediately invoked function; name the function.
  • added code matches a code pattern: apps/web/src/pages/workspace/prompt-box.model.ts:157 empty-fallback: Invented fallback (an empty string, list, object or zero); handle the missing value instead., apps/web/src/pages/workspace/transcript.tsx:525 empty-fallback: Invented fallback (an empty string, list, object or zero); handle the missing value instead.

Stacked on #335: only this pull request's own changes were checked.

The coordinator's question, then approvals, then steps held for the
person's go-ahead, then plugin screens, then the warning about the
words about to be sent. The prompt box shows the first as its one card
and the plugin space opens the screens in this order. Sample projects
cover each rule.
One line above the prompt box and its one button: a message on its
way, specialists at work, the coordinator thinking, work that failed
since the person last wrote, a failed plan step, a version not yet
opened, then the running app. The hub has no retry, so the button for a
failure asks for one and says so.
The plugin space is where a plugin's screen opens: a column beside the
room's main area, or a sheet over it on a narrow window. The box's step
card asks for a held step's go-ahead, with Yes, go ahead where Send
stands; its screen card names a screen waiting in the space, with Open.
The prompt box holds one card at a time, the first of what waits:
the coordinator's question, an approval, a step held for the go-ahead,
or a plugin screen waiting in the plugin space. prompt-box.model.ts
reads the room and the hub's live app, runs waiting.ts and
room-status.ts, and hands the box its card, the pill its line and the
space its screen; the room's model only puts them together.

The thread keeps a question or approval only once it is settled. Every
plugin screen opens in the plugin space, beside the main area in both
the conversation and the project view, or as a sheet below 900px. The
step's go-ahead leaves the plan for the box. Stop shows only while a
specialist runs, since the coordinator's own turn cannot be stopped.

Removed with it: the open cards in the thread, plugin screens in the
chat and over the room, the chatScreens slot, plugin tabs in the
project view and the whole-room question.
The status pill above the prompt box says what is happening and offers
the one button, so the line above the conversation goes. The project's
next step stays read for the box's placeholder.
The box's question, approval, step go-ahead and waiting screen; the
pill working, ready and failed with Stop for a specialist; the plugin
space as a column beside the conversation and the project view, and
as a sheet on a narrow room; each in light and dark.
An open question now waits only in the prompt box, so the questions
card's own layout for the conversation (its thread of answered rows,
Back, Cancel and Continue row, and own-words field beside the options)
goes, with the place prop and the wording only it used. A settled
question still shows in the thread as before. Clicking a pick-one
option already picked no longer re-picks it, which only served the
conversation card's move to the next question.
In the project view the pill above the prompt box stood over the
document's floating bar. While the pill shows, the bar and its handle
stand above it.
Close and a submitted screen moved focus before the prompt box moved
back under the conversation, so focus fell to the page. The room now
moves it once the box is in place, and Open on a sheet already up
focuses its heading.
"Go ahead with build the app?" lowercased an imperative title into the
sentence; the card now quotes the step as written.
A step held for the person's go-ahead now waits in the prompt box, so
the Go ahead item in the step's sidebar menu goes, with the goAhead flag
on a sidebar step and its onGoAhead. The box's step card still calls
goAheadPlanStep.
The plugin space's column pulled the conversation, the document and
the prompt box off the middle of the window, and the sidebar did the
same from the other side. The page now balances what stands beside it:
the side with less beside it takes the difference as ground, moving in
step with the sidebar. The column takes what a 46rem measure in the
middle leaves it, between 20rem and 28rem.
The rail of ticks beside the turns is gone for now; the conversation reads as one column. A question's label for its divider moves into the transcript, which is the only place left that reads it.
The turns read at 48rem, as the usual chat apps hold theirs, and the prompt box runs to their text's edges, so its sides line up with the words above it. The plugin space's column takes what that leaves.
Starting, a failed start and a missing model stand where the box does, at its width and clear of the window's foot, instead of across the whole canvas. Their buttons are outline and ghost, never the accent.
The conversation and the project view no longer stand on an inset, rounded card over the sidebar's grey: the canvas runs flush to the window and centres what it holds. The project view fades in briefly instead of growing, as it is the canvas changing what it shows. Where the canvas is narrow, the top bar makes room under the project's floating name.
The status pill floats where the conversation's scroll button stands, so the two overlapped while something was happening. While the pill shows, the button stands clear above it.
@pratikbuilds

Copy link
Copy Markdown
Contributor Author

Replaced by #345, the same code rebuilt as one PR with commits that read in order. It's stacked on #344, which has the parts.

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.

1 participant