fix(interactors): make the shared link work, and let a custom resource be put away - #209
Merged
Merged
Conversation
…e be put away Two faults in the custom-resource work, both found by reviewing it rather than by any failure, and the first is a promise the app was not keeping. **"Share by link" produced a link that drew nothing.** Ticking the box uploads the data precisely so the overlay can be opened by someone else. The address carries `?overlay=<token>`, and on a fresh load that string was cast straight to an InteractorToken -- so `summary` was undefined and `getCustomResourceInteractors` returned at its first line, silently. Measured: the link opened with 0 badges where the session that made it had 1. A string is now resolved to a token object, and listed in the panel, so whoever follows the link can see and clear what it turned on rather than facing an overlay with no control for it. The service has no endpoint that names a token -- `token/<id>/summary` is a 404, measured -- so it is labelled by its first characters: "Shared (d4f9f8da)". Honest about being someone else's resource, and identifiable against the address. **Clicking an active custom resource never put it away.** The toggle read `resource.summary?.token` while `currentResource()` holds the resource's *name*, so the two could never match -- the one gesture that branch exists for, and the one asked for when it was built. It compares names now, for all three kinds of resource. Shown red against both: clicking again left the badge drawn, expected 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Found reviewing this PR before merging it, which is the point of doing so. #206 fixed `deleteCustomResource` to remove elements by the resource's name rather than by an object stringified to "[object Object]". That covered a resource read in this page, which is drawn under its name, and missed one fetched from the service, which is drawn under the token the response names. So deleting a shared resource still left its badges on the diagram -- the same fault, still live on the other half of the path. Measured on beta: one badge before deleting, one after. It removes by both identifiers now, and the shared-link case asserts the diagram is clear afterwards rather than only that the list is empty -- which is the assertion that let this through the first time. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
adamjohnwright
enabled auto-merge (squash)
September 16, 2026 16:19
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.
Adversarial review of the custom-resource work. Two faults, and the first is a
promise the app was not keeping.
"Share by link" produced a link that drew nothing
Ticking that box uploads the data precisely so the overlay can be opened by
someone else. The address carries
?overlay=<token>, and on a fresh load thatstring was cast straight to an
InteractorToken— sosummarywas undefined andgetCustomResourceInteractorsreturned at its first line. Silently.A string is now resolved to a token object and listed in the panel, so
whoever follows the link can see and clear what it turned on rather than facing
an overlay with no control for it. The service has no endpoint that names a token
—
token/<id>/summaryis a 404, measured — so it is labelled by its firstcharacters,
Shared (d4f9f8da): honest about being someone else's resource, andidentifiable against the address.
Clicking an active custom resource never put it away
The toggle compared
resource.summary?.tokenwhilecurrentResource()holds theresource's name, so the two could never match. That is the one gesture the
branch exists for, and the one that was asked for when it was built. It compares
names now, for all three kinds of resource.
Verification
Both shown red against the old code — clicking again left the badge drawn
where 0 was expected, and the shared link opened empty.
240 unit tests, 11 custom-dialog e2e cases, lint 652 and dead code 145 unchanged.
🤖 Generated with Claude Code