You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unify selection toolbars and preserve comment interactions - #374
Unify Note, PDF, Chat and File Reference selection chrome into compact, separate action and Comment capsules, preserving each surface's intended actions.
Require an authored comment and explicit confirmation before staging; retain frozen PDF comments while scrolling and isolate Note formatting shortcuts from the comment editor.
Preserve native PDF excerpt dragging, add a scale-correct gutter grip and one unfilled outer selection frame per page, and keep persistent highlighting explicit.
Reopen Chat quotation sources through their real conversation owner rather than creating duplicate unbound tabs.
Share final document-destination validation, remove obsolete action-mode/picker APIs, restore strict empty-comment submission validation, and update architecture documentation.
This branch is based directly on main and excludes unrelated local Canvas, layout and desktop work.
Validation
pnpm typecheck
pnpm format
pnpm lint:fix (0 errors; warnings remain)
pnpm check:i18n
Targeted selection, comment, source-navigation, PDF zoom and Sketch unit suites, plus shared-schema and server-renderer tests
Playwright coverage for Note/File mouse and touch flows, PDF highlight persistence and native/grip dragging, frozen comments across scrolling, and Chat draft editing/cancellation; affected scenarios rerun after final changes
Real touch/pen hardware has not been exercised; browser touch emulation is covered.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved issues cause duplicate destination tabs, unavailable cross-Space source previews, and altered PDF quotations when selected words span text nodes.
This PR consolidates selection toolbars across Huabu’s document and Chat previews while keeping comment staging separate from sending an Agent request.
Changes:
Introduces compact action and Comment capsules with shared comment editing and destination validation.
Adds PDF selection highlighting, excerpt dragging, and frozen comments; adds owner-aware Chat source navigation.
The reason will be displayed to describe this comment to others. Learn more.
Verified and fixed in 70f77e7. Document comment staging now reuses openSpaceConversation, with shared owner-tab lookup for node/conversation representations. Existing tabs are activated rather than duplicated; absent destinations retain side-opening. Added regressions for both existing target kinds.
Verify and address Copilot feedback on cross-Space document sources, existing Agent destinations, and split PDF text nodes. Update the obsolete PDF header assertion and add regression coverage.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
If Copy is still pending when the user opens Comment, its completion calls onDismiss and discards the open comment editor, including any text entered there. Share the copying state with the Comment capsule, or use a current edit-state ref to suppress copy-completion dismissal after editing begins. Add a regression using a deferred clipboard promise.
Exclude highlight labels from captured PDF selections
A native selection from a highlighted page into the next page also spans these invisible Highlight Text labels, which sit after the text layer. Because readPdfSelection() captures the whole range, UI text and rectangles can enter excerpts, quotations and highlight evidence. Move annotation controls outside selectable PDF content and restrict capture to text-layer glyphs, with a multi-page regression containing an existing highlight.
Preserve separators between disjoint highlights in one text node
Disjoint highlight rectangles within one text node bypass the separator check: highlighting only alpha and gamma in alpha beta gamma produces the quotation alphagamma. This can occur after subtracting overlapping highlights or with legacy partial unhighlighting. Apply the geometry-based separator check within text nodes too, while preserving adjacent glyphs and literal whitespace.
When a remote source returns conversation_owner_missing, this opens an unbound Chat without switching to its owning Space. That Chat is treated as local, so sending fails with “Source Canvas is no longer active” and Canvas-only actions are incorrectly enabled. Navigate to the owning Space before opening the fallback, or implement remote-unbound session handling.
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
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.
Summary
This branch is based directly on
mainand excludes unrelated local Canvas, layout and desktop work.Validation
pnpm typecheckpnpm formatpnpm lint:fix(0 errors; warnings remain)pnpm check:i18nReal touch/pen hardware has not been exercised; browser touch emulation is covered.