Conversation
Persist the URL hash/anchor across environment switches (incl. edit). The text fragment directive (:~:text=...) is stripped from the page's window.location by the browser, so it is read from the tab URL via a new getTabUrl internal action. For DA edit URLs the directive is appended to the existing route anchor; other pre-existing anchors are ignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the text-fragment (:~:text=) approach with a selection-based one. The browser strips fragment directives from window.location and DA content lives in shadow DOM / loads async, so native text fragments cannot be applied there. Instead, track the last non-empty text selection (via a selectionchange listener) as a text-fragment-style descriptor ([prefix-,]exact[,-suffix]) and append it to DA edit URLs as ?select=, so DA can locate and restore the selection. Rendered environments (preview/live/dev/review/prod) persist the plain hash/anchor only. Reverts the getTabUrl internal action introduced earlier. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The stubbed Selection object failed a TS check (insufficient type overlap). Drive updateSelection with a real range/selection instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a documented selection field, and clear the cache when the selection collapses with focus outside the sidekick, so users can discard a pending selection before switching to the editor. Collapses caused by interacting with the sidekick (which move focus into it) keep the cache. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Store the selection as { exact, prefix, suffix } and emit it as
?select=/?selectPrefix=/?selectSuffix= via searchParams.set. This lets DA
consume each value with a plain searchParams.get() (proper decoding, no
custom descriptor parser), prioritizing ease of consumption over a compact
URL, while keeping prefix/suffix disambiguation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Defer prefix/suffix disambiguation until users report ambiguity. Store the selection as plain text and emit a single ?select= param, which DA can read with searchParams.get(). Simpler on both sides. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
DA-side consumer follow-up (reading |
rofe
marked this pull request as draft
August 28, 2026 09:42
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.
Fix #889
What
hash/anchor (
#...) to the target environment URL.Document Authoring, carry the user's current text selection into the editor
as a
?select=query param so DA can restore/scroll to it.editors (SharePoint, Google Docs, BYOM) are unaffected.
Notes
selectionchangelistener,because interacting with the sidekick (e.g. the env switcher) collapses the
live document selection. The cache is cleared when the selection collapses
with focus outside the sidekick (i.e. the user deselects on the page).
?select=and applying it to the editor) is aseparate follow-up on
adobe/da-live.🤖 Generated with Claude Code