Repository navigation
[HOLD 3.1] feat(workspace): element picker for previews - #524
Merged
Merged
Conversation
The workspace beside an assistant's conversation, extracted from Aveiro 2.0: keyed tabs that open as a preview and switch to the app's real editor, an open editor that keeps its version across refreshes, a cap on open tabs, arrow keys and Delete in the tab strip. ActionCard is the card an assistant answers with: icon, title, status, body and a footer whose primary button is the proposed write. Generic over the tab's data, so Aveiro, Sigilio, Tavilio and Stack apps draw their own previews and editors. Docs page under Modules. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtvpR3Lod9g4TL7GsZP
armElementPicker and useElementPicker, extracted from Aveiro 2.0's section picker: point at a block in a same-origin preview so the next message is about it. Picks the outermost <section> with its position and heading, or a single heading, paragraph, image or link on a page without sections. Clicks don't follow links while armed; Escape cancels; a miss is reported instead of swallowed. The picked block stays outlined until cleared. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtvpR3Lod9g4TL7GsZP
An arrow with a dashed selection box in the accent colour (selectCursor), set by a style rule over the whole document so links and buttons show it too, removed on disarm. The cursor option takes any CSS cursor instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtvpR3Lod9g4TL7GsZP
…' into feat/workspace-element-picker
…' into feat/workspace-element-picker
lorant-one
changed the base branch from
feat/workspace-panel-action-card
to
preview
November 24, 2026 01:45
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtx8NozwfTMFAJUwVuh
27 tasks done
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.
Requested by Lorant · project thread
Stacked on #523. Second piece of the Workspace kit (plan: https://claude.ai/artifact/EwmxSDFjrYDtGH1wpWjNgs).
What
The pointer that lets a person point at part of a preview, so the next chat message is about it ("make this shorter"). Extracted from Aveiro 2.0's
section-picker.tsand made generic:armElementPicker(doc, options)(plain DOM). Blocks outline under the pointer and a click picks one. While armed, clicks don't follow links, and Escape cancels. A click that hits nothing goes toonMiss("outside" | "nothing")instead of being swallowed.<section>, it picks the outermost section and reportsindex/totaland its heading.useElementPicker(frameRef, options): arms one pick on a same-origin frame and keeps the picked block outlined untilclear(). On a cross-origin frame it does nothing.markElement,pageSections,frameDocumenthelpers.Aveiro-specific parts stay in Aveiro: mapping the frame URL to a page path and the
SectionSelectionshape.Checks
element-picker.test.ts(7 tests: section pick with position and heading, miss outside a section with the link click prevented, element fallback, hover outline cleanup, Escape, mark).ai-catalog"describes no component the spec does not have", which happens because the generatedai/artifacts are deliberately not committed. CI regenerates them, as it did for [HOLD 3.1] feat(workspace): WorkspacePanel, useWorkspace and ActionCard #523.tsc --noEmitclean, Biome clean on the touched files.Generated by Claude Code