Repository navigation
Conversation
Open comment threads were only visible as faint highlights in the text. Each one now gets the first commenter's avatar in the page margin beside the document, aligned with its line. Clicking the avatar opens the discussion, and hovering the avatar or its text highlights both. The markers sit outside the document card, so the text keeps its width. They hide when the window leaves no room in the margin. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a18e32-b8a4-7319-95b9-7279b536d0f1
ubuntu-latest now resolves to Ubuntu 26.04, where ruby/setup-ruby has no Ruby 3.4.7 build, so the lint job failed before RuboCop ran. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a18e32-b8a4-7319-95b9-7279b536d0f1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed and why
Open discussions were easy to miss. The only sign of a comment was a faint highlight in the text, and you had to click it to learn who said what.
Now each open discussion also shows the first commenter's avatar in the page margin, to the right of the document card, on the line it refers to.
s.The new
coplan--comment-margincontroller reads the highlights thatcoplan--text-selectionalready builds, plus the thread popovers in#plan-threads. It needs no new server data. A one-line change intext_selection_controller.jskeeps a discussion opened from an avatar beside that avatar when highlights rebuild.Evidence
Light theme, default: the avatar sits in the margin beside its highlighted text.
Light theme, hovering the highlighted text: the avatar grows and gets a ring.
Several discussions close together stack in the margin.
Dark theme, with a discussion opened from its avatar.
How to try it
bin/setup --skip-server, thenbin/dev.hampton@example.comwith a window at least 1280px wide.Testing
bundle exec rspec spec/system/comment_ux_spec.rb: a new spec covers marker placement outside the document, alignment with each line, hidden resolved threads, hover in both directions, and opening a discussion.bundle exec rspec: 3054 examples, 0 failures.Checked by hand in the browser in light and dark themes at 1280, 1440, and 1680px.
Added or updated real JavaScript-enabled browser specs in
spec/system/for changed UI behavior, covering the user interaction and visible result; or explained why no browser UI is involved.Added model, service, or request specs where needed for domain behavior, authorization, or API cases. (Not needed: client-side only.)
Ran
bundle exec rspec, or explained why it could not run and listed the specs that did run.Tested affected UI behavior in both light and dark themes, or explained why theme testing does not apply.
Attached a video or images demonstrating the change, if this PR adds or changes a feature or fixes a UI bug.
Generated with Amp