Skip to content

HOOD-6816 Keep linked comment windows open after rendering - #324

Merged
HamptonMakes merged 1 commit into
mainfrom
hood-6816-keep-linked-comments-open
Nov 11, 2026
Merged

HamptonMakes merged 1 commit into
mainfrom
hood-6816-keep-linked-comments-open

Conversation

@salamagd

Copy link
Copy Markdown
Collaborator

What changed and why

Opening a ?thread= link to a discussion on earlier text briefly showed its window, then closed it when an asynchronous renderer refreshed the document's comment highlights. Document-level discussions had the same problem: restoring an open window only looked for an inline highlight.

Keep the window attached to its entry in Comments or Earlier comments when no inline highlight exists. Add browser coverage for linked inline, document-level, earlier-text, and resolved earlier-text discussions in light and dark mode, including repeated rendering refreshes, reply drafts, and dismissal.

Tracks HOOD-6816.

Evidence

Light Dark
Earlier-text discussion stays open in light mode Earlier-text discussion stays open in dark mode

How to try it

  1. Start the demo host and sign in as hampton@example.com. Open the Reading specimen from /hampton/demo-library.
  2. Comment on a passage, copy the discussion link, then edit that passage so its discussion moves to Earlier comments.
  3. Open the copied link. The discussion should stay open as the document's diagrams and code finish rendering. Type a reply draft, then press Escape to dismiss it.

Manual testing

Used an isolated development database and the shared browser to open a deep link to an earlier-text discussion in the Reading specimen, in light and dark mode. The window stayed open after the diagrams and code rendered; a reply draft remained editable, and Escape closed it.

@salamagd
salamagd marked this pull request as ready for review November 11, 2026 17:14
@HamptonMakes

Copy link
Copy Markdown
Collaborator

🤖 @codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T17:35:14.164605Z 0816ad4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 0816ad4fe2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@HamptonMakes

Copy link
Copy Markdown
Collaborator

🤖 Engineering cleanup complete for 0816ad4fe26d6a1b8918d768e2a8f6e9a3bb888a. No additional commits or pushes were needed.

  • Substantive local review found no blocker. Requested Codex review completed on this exact head with no major issues; no unresolved review threads.
  • Local verification: 74 examples passed across linked_comment_navigation_spec, comment_ux_spec, and collapsed_section_comments_spec. All 15 current-head GitHub checks pass, including both database suites and browser stress checks.
  • Independently exercised inline, document-level, earlier-text, and resolved earlier-text deep links in light and dark using isolated headless Chrome for Testing. The rich Reading specimen rendered its diagrams; discussions survived repeated highlight refreshes, retained reply drafts, stayed beside visible anchors without page scroll jumps, and stayed dismissed after Escape plus another refresh.
  • Current GitHub state: MERGEABLE / BLOCKED / REVIEW_REQUIRED, ready for review. No approval or merge performed. Remaining judgment is Hampton's interaction acceptance and the required human review.

Try the prepared local preview at earlier-text discussion. Sign in as hampton@example.com, no password, then reopen the link if login takes you to the library. Type a reply draft, let the document finish rendering, and press Escape. The window should remain readable until dismissed. Preview uses dedicated development/test databases and is left running for Hampton's tryout.

Light Dark
Earlier-text discussion with retained reply draft in light mode Earlier-text discussion with retained reply draft in dark mode

@HamptonMakes
HamptonMakes merged commit 3b1cdcb into main Nov 11, 2026
15 checks passed
@HamptonMakes

Copy link
Copy Markdown
Collaborator

🤖 Post-merge CI investigation and release evidence:

Merge Original main attempt Evidence
#311 (cd5dfdc0) 43087241467 / attempt 1 failed Browser 4/4 failed editor_lists_spec.rb:195, caret offset assertion, seed 8443. Browser 1/4 and 3/4 were cancelled.
#305 (0b3c0dd0) 43087376842 passed All jobs green on the merge commit, attempt 1.
#324 (3b1cdcb2) 43087536377 / attempt 1 failed Browser 4/4 raised StaleElementReferenceError in math_rendering_spec.rb:196, seed 41209. Browser 2/4 was cancelled.
#321 (06fecace) 43090004657 passed All jobs green on the merge commit, attempt 1.

The #324 math failure reproduced naturally on the fifth focused Mac/MySQL run (seed 41213). The retained screenshot has both expected highlights; the test holds WebDriver nodes across a thread refresh. PR #326 reads the ordered texts in one browser snapshot inside Capybara's retry loop, preserving exact text/count, source-range, math exclusion and reload assertions. Ten fresh-process repetitions and the combined math/list specs (37 examples) passed with that test change. Product code is unchanged; the fix is not merged.

The #311 caret failure is different and remains unexplained. Five focused runs passed, as did three runs of its original predecessor sequence (nine examples). Those passes do not establish a cause or product fix.

Exactly one diagnostic retry was selected for each failed job: #324 retry and #311 retry. Both passed on unchanged commits. Both workflows still conclude cancelled because their original cancelled shards were not retried. Later green runs and these retries do not erase the original failures or incomplete coverage. No additional retry or direct-to-main change was made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants