Repository navigation
Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
| header={ | ||
| <> | ||
| <div data-slot="question-header-title">{summary()}</div> | ||
| <div |
There was a problem hiding this comment.
Would be great to add an icon next to the title showing current minimized state e.g. arrow up/down as with tasks list
69a8952 to
6f35658
Compare
BYK
left a comment
There was a problem hiding this comment.
Good suggestion — added a chevron-down icon that rotates to indicate the minimized state, matching the pattern used in the todo dock.
- Render plan content as markdown in the exit prompt and guard empty plan - Render question dock text as markdown in the web UI - Restore scroll on question dock for long plan content - Prevent question dock from auto-scrolling to focused option - Add tap-to-collapse on question dock header title
6f35658 to
4a619cd
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds support for minimizing the question dock UI and improves the plan-exit flow by validating and displaying the current plan content before switching to the build agent.
Changes:
- Add “minimized” behavior to dock prompts and wire it into the session question dock UI.
- Adjust dock/question layout CSS to support scrolling/max-height and the minimized header interaction.
- Enhance
plan_exitto prevent exiting with an empty plan and to include plan contents in the confirmation prompt.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/components/message-part.css | Adds minimized padding, makes header title clickable, and moves scroll/max-height behavior to the prompt container. |
| packages/ui/src/components/dock-surface.css | Changes overflow behavior for the dock surface container. |
| packages/ui/src/components/dock-prompt.tsx | Adds a minimized prop and conditionally hides content/footer when minimized. |
| packages/opencode/src/tool/plan.ts | Validates plan file is non-empty and injects plan content into the confirmation question. |
| packages/app/src/pages/session/composer/session-question-dock.tsx | Adds minimize toggle UI, uses Markdown for question text, and prevents scroll on focus. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| overflow-y: auto; | ||
| max-height: calc(var(--question-prompt-max-height, 70dvh) - 140px); |
| <Show when={!props.minimized}> | ||
| <div data-slot={slot("content")}>{props.children}</div> | ||
| </Show> | ||
| </DockShell> | ||
| <DockTray data-slot={slot("footer")}>{props.footer}</DockTray> | ||
| <Show when={!props.minimized}> | ||
| <DockTray data-slot={slot("footer")}>{props.footer}</DockTray> | ||
| </Show> |
| const content = yield* Effect.promise(() => Bun.file(abs).text().catch(() => "")) | ||
| if (!content.trim()) { | ||
| return { | ||
| title: "Plan is empty", | ||
| output: `The plan file at ${plan} is empty. Please write the plan first before calling plan_exit.`, | ||
| metadata: {}, | ||
| } | ||
| } |
| questions: [ | ||
| { | ||
| question: `Plan at ${plan} is complete. Would you like to switch to the build agent and start implementing?`, | ||
| question: `Plan at ${plan} is complete. Would you like to switch to the build agent and start implementing?\n\n---\n\n${content}`, |
| <div | ||
| data-slot="question-header-title" | ||
| role="button" | ||
| onClick={() => setStore("minimized", !store.minimized)} | ||
| > |
| <div data-slot="question-text" class="overflow-auto"> | ||
| {question()?.question} | ||
| </div> | ||
| <div data-slot="question-text" class="overflow-auto"><Markdown text={question()?.question ?? ""} /></div> |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #27889, closes #18515
Type of change
What does this PR do?
Fixes several UX issues in the plan-exit question dock:
plan.ts), making structured plans with headings, lists, and code blocks readable. Also guards against empty plans.session-question-dock.tsx).dock-surface.css,message-part.css).session-question-dock.tsx).dock-prompt.tsx,message-part.css).How did you verify your code works?
Tested locally by entering plan mode, creating a long plan, and triggering
plan_exit. Verified markdown renders correctly, scroll works for long content, focus doesn't auto-scroll away, and tap-to-collapse works on the header.Screenshots / recordings
N/A — behavioral fixes to existing UI components.
Checklist