feat(panel): an Inbox ask's controls move into the draft reply at the thread's end
Merged
DA
5d ago+552+552+012345678901234567890123456789-333-333-012345678901234567890123456789
Summary
The developer wants an Inbox thread to feel like a Linear issue's thread: you write your reply at the end of the thread, and what you send drops into the thread as your comment. This PR builds the mockups they approved.
- Draft reply at the end of the thread. The last comment in every thread is now the reader's own draft: their face, then "You · draft", then the composer. The composer scrolls with the messages instead of being pinned to the bottom of the pane. What you send drops into the thread in the draft's place (as #4139 draws an answered ask), and a plain draft ("Reply…", +, Reply) stands at the end again.
- The open ask's controls move into the draft. The agent's message now ends with a small pill marker only: "Waiting on you" with an orange dot, or "Waiting on " with a muted dot. The ask's controls stand at the top of the draft's card with no head over them, then a divider, the note box ("Add a note…"), and the footer.
- decide: numbered options, Recommended pill kept. yes/no: its two buttons. do: steps, Mark done, Couldn't do it. answer with fields: the fields (#4141's no-Submit form). answer without fields: its Answer press.
- The button always reads Reply. The footer says "Replying keeps the ask open" while no answer is picked, and nothing once one is, since the picked control says it. This replaces the button that renamed itself and the stamp with × above the words.
- To take an answer back, press it again. Options and buttons toggle, as do Mark done, Couldn't do it and Answer. Every form select can now be unpicked too, including a required one, since #4141 sends a form without its empty fields.
- The older single-item layout (before v5) works the same way, as the orchestrator asked. Its choice, approval, to-do or form controls move into the draft the same way. Its agent comment ends with the same marker. Its Send button and quiet lines are as before.
- Where an item lands when you open it. An item that waits on an answer opens at the end of the thread, with the draft reply standing just above the bottom of the board. This now happens at every width, not only narrow. It stands there again while late pictures load, until you move the thread yourself. A thread with no open ask opens at its top. After you send, the board scrolls so your new comment and the draft below it are in view.
- Unchanged: replaced and withdrawn asks, answered cards, an ask of a type this build doesn't know, and threads with no open ask look as they did.
- On an archived task, no draft can stand, so the open question stays in the agent's message as a card that takes no input, above the Unarchive note. The options still show.
- Keyboard: number keys still pick, Enter on an option or field still sends, and Enter's jump to what's missing skips the form's own text fields. The other shortcuts are untouched.
- Covers both mounts of
InboxPane: the desktop Inbox (desktop-inbox.tsx) and the task's inbox pane (desktop-tasks.tsx).
Calls made
- The button always reads Reply. The stamp and its × are removed (
attachedStampandwithoutAnswerare deleted, since nothing calls them now). - The older layout's controls move into the draft as well (orchestrator).
- After the developer's review: the draft's head ("Pick one", "1–3 to pick", "Fill in · 2 of 3 filled", "Steps · 1 of 3 done") and the footer's "Sends ‘Chose 7 days’" line are removed as redundant, and the marker drops the ask's kind ("Pick one · waiting on you" → "Waiting on you"). The answered card's head from #4139 ("Pick one ✓ Chose 7 days", after sending) is left as it was.
Screenshots
These show the real panel with the bundled app stylesheet (light, desktop profile, 760px wide pane), rendered from the inbox test harness's fixtures. Before is main at #4141.
| State | Before | After |
|---|---|---|
| Open pick-one (7 days picked, note typed) | ![]() | ![]() |
| Open form (2 of 3 filled) | ![]() | ![]() |
| Open to-do (1 of 3 ticked) | ![]() | ![]() |
| Open yes/no | ![]() | ![]() |
| After sending | ![]() | ![]() |
| Thread with no open ask | ![]() | ![]() |
| Older layout (before v5), choice | ![]() | ![]() |
At a narrow width (360px), the footer's quiet line is hidden as before (@container composer (max-width: 299px)):

Evidence
pnpm check:affectedran out of memory (137) on the panel typecheck in the sandbox, so I ran its steps one at a time. All passed:typecheckfor@luke/panel,@luke/weband@luke/desktoplint,knip,discarded-effectvitest --project panel: 277 files, 2820 tests passed
Tests
desktop-inbox.test.ts:- Rewritten for the new layout. Each of these fails on
main:- The thread's open ask is a "Waiting on you" marker in the agent's message, its options sit in the draft's card above the note with no head over them, and the draft is the last comment, "You · draft".
- A pick clears the footer's "keeps the ask open" line and pressing it again lets it go. A number key still picks. After sending, the draft stands plain at the end.
- yes/no buttons toggle; the form's fields and the to-do's presses stand in the draft, either to-do press toggles.
- A teammate's marker uses the muted dot. The draft keeps its pressed answer across items.
- Scroll-on-open: an item waiting on an answer opens at its end in narrow and wide rooms alike, and so does an older item. A thread with no open ask opens at its top. A late picture re-stands the draft.
- Scroll-on-send: brings the draft below your new comment into view.
- Older layout: its form stands in the draft, and its marker shows. A required select can now be cleared.
- Archived task: its options stay in the agent's message as a card that takes no input, with no draft reply.
threadOfleaves the draft out. TheattachedOfhelper is gone with the stamp.
- Rewritten for the new layout. Each of these fails on
inbox-model.test.ts: theattachedStampassertions go with it.- Test count:
desktop-inbox.test.ts159 → 160 (+1: a thread with no open ask opens at its top; the narrow-only scroll tests are rewritten for every width).inbox-model.test.tsunchanged in count. The panel project passed in full on the first revision; the inbox suites pass on this one.
Notes
- Out of scope, left to the sibling PRs: the message file strip (
Message/CommentFiles), notices in Needs you (#4169). - In the screenshots the draft's face is the signed-in account. The harness had no account until I gave it one for these pictures.
Made with Luke













