GeezerVison is showing github.com — feat(ui): make the line comment card a text field by opencode-agent[bot] · Pull Request #58970 · anomalyco/opencode
Conversation
Reworks line comments in the file view and review, and fixes a few rough edges around them.
Editor
- The card is the text field: the "Comment" heading and the inner textarea frame are gone, so typing happens directly in the card. The textarea keeps "Comment" as its accessible name.
- Cancel and Comment use the small button size.
- 4 lines fit by default (4 rows at the card's 16px line height). The old fixed
min-height: 80px clipped the 4th line.
- No
line X label. selection is now optional on LineComment and LineCommentEditor; the browser panel still uses it for page or element context.
Submitted comment
- Keeps its overflow menu (Edit, Delete). A click anywhere on the card also opens the editor; the menu remains the keyboard path.
- Line breaks are kept (
white-space: pre-wrap).
Elsewhere
- The gutter
+ is a drawn 12px SVG instead of a text glyph. At 2x the glyph sat 1.5 device px below center; it's now exactly centered.
- Comment and file attachment cards in the composer and in chat clipped Inter descenders. The 11px text had a 12px line box inside
overflow: hidden (scrollHeight 13 vs clientHeight 12). It now uses a 14px line box, so the card is 4px taller (46 → 50px).
Checks
bun typecheck in ui, session-ui, gui-extensions and app.
session-ui component tests line-comment-v2.spec.ts, including a new line-break case that fails without the fix.
app component tests browser-pane.spec.ts and extension-host.spec.ts (51 passed).
- App e2e
mobile-extensions.spec.ts, which now also opens a saved comment's editor by clicking the card, plus e2e/regression -g comment. A local run also checked opening the menu and deleting.
Requested by: @vimtor (victor via Slack)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I checked it in the session-ui component test browser with the PR's sources and again with the base sources.
- With four lines typed, the editor textarea measured 86/78 (
scrollHeight/clientHeight) on the base, so the 4th line was clipped. With the PR it measures 86/86.
- A multiline comment renders as one line on the base. With the PR its blank line is kept.
- The new line-break test fails on the base and passes with the PR.
line-comment-v2.spec.ts and session-review-comments.spec.ts pass (6/6).
tsc -b is clean in ui, session-ui and gui-extensions.
The browser panel still passes selection. The new margin-inline-start: auto keeps the footer actions on the right when there is no meta text.
Public API: unchanged (no SDK, server, plugin, config or CLI surface). selection becoming optional on LineComment and LineCommentEditor in @opencode/ui is backwards compatible.




Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Draw the gutter + so it is centered, fit four lines in the editor by default, keep line breaks in submitted comments, and drop the line label from file and review comments.
The editor drops its heading and inner textarea frame, so the card is the field, with small Cancel and Comment buttons. A saved comment loses its overflow menu: clicking the card opens its editor, which offers Delete.
opencode-agent
Bot
changed the title
fix(ui): polish the line comment editor and card
feat(ui): make line comments a typeable, clickable card
Oct 25, 2026
Restore the overflow menu with Edit and Delete on saved comments and drop the editor's Delete button. A click on the card still opens the editor.
opencode-agent
Bot
changed the title
feat(ui): make line comments a typeable, clickable card
feat(ui): make the line comment card a text field
Oct 25, 2026
Rename LineCommentShape to SavedLineComment, type the comment state store instead of asserting, and store the edited id through the updater form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. In the session-ui component test browser, the filled editor now types directly in the card, its textarea is named "Comment", and four lines fit with no scroll (64/64; the base clipped them at 86/78). line-comment-v2.spec.ts and session-review-comments.spec.ts pass, and tsc -b is clean in ui, session-ui, gui-extensions and app. Both comment menus stop click propagation on their wrapper, so Edit and Delete in the portalled menu don't also open the editor through the new card click. Nothing passes the removed heading prop.
Public API: unchanged. LineComment gains onOpen and loses onClick, and LineCommentEditor's heading becomes label; these are @opencode/ui component props used only inside the repo.
One minor point inline: selecting text in a saved comment probably opens its editor.


Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
data-component="line-comment-v2"
|
|
|
data-variant="display"
|
|
|
data-clickable={local.onOpen ? "" : undefined}
|
|
|
onClick={() => local.onOpen?.()}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the whole card is clickable, selecting text in a saved comment to copy it will probably open the editor too (I didn't test this). Skipping onOpen when window.getSelection() is a non-collapsed range inside the card would keep copying possible.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
Hona
Awaiting requested review from Hona
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|