GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions
@github-actions github-actions Bot added the contributor label Oct 25, 2026
@opencode-agent opencode-agent Bot assigned vimtor Oct 25, 2026
opencode-agent[bot]
opencode-agent Bot commented Oct 25, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

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.

Before

After

Before

After

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vimtor added 2 commits October 25, 2026 12:35
@vimtor @Hona
fix(ui): polish the line comment editor and card
6ec25ac
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.
@vimtor
feat(ui): make the line comment card its own text field
e2b5fff
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
opencode-agent Bot force-pushed the line-comment-polish branch from 527e478 to e2b5fff Compare October 25, 2026 12:53
@opencode-agent
opencode-agent Bot requested review from Brendonovich and Hona as code owners October 25, 2026 12:53
@vimtor
fix(session-ui): stop clipping descenders in attachment cards
dc0f58a
@opencode-agent 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
@vimtor
fix(ui): bring back the line comment menu
e09f109
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 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
@vimtor
chore(session-ui): clear lint in the line comment controllers
6dbbf93
Rename LineCommentShape to SavedLineComment, type the comment state store instead of asserting, and store the edited id through the updater form.
opencode-agent[bot]
opencode-agent Bot commented Oct 25, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

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.

Before

After

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/ui/src/data-display/line-comment/line-comment.tsx
data-component="line-comment-v2"
data-variant="display"
data-clickable={local.onOpen ? "" : undefined}
onClick={() => local.onOpen?.()}

@opencode-agent opencode-agent Bot Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

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.

All reactions
@opencode-agent
opencode-agent Bot merged commit 9e8c5f5 into dev Oct 25, 2026
20 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@opencode-agent
opencode-agent Bot deleted the line-comment-polish branch October 25, 2026 13:11
@kitlangton kitlangton mentioned this pull request Oct 25, 2026
chore: merge dev into beta #59055
Closed
@amrkmn amrkmn mentioned this pull request Oct 27, 2026
opencode 2.2.0 amrkmn/homebrew-tap#1182
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Oct 28, 2026
Tool release: OpenCode 2 v2.2.0 (was v2.1.4) agent-sh/agnix#1737
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Hona Hona Awaiting requested review from Hona
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@vimtor vimtor

Labels

contributor

Projects

None yet

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.

1 participant

@vimtor
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.