Skip to content

fix(interactors): make the shared link work, and let a custom resource be put away - #209

Merged
adamjohnwright merged 6 commits into
mainfrom
fix/shared-custom-overlay
Sep 16, 2026
Merged

adamjohnwright merged 6 commits into
mainfrom
fix/shared-custom-overlay

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

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 that
string was cast straight to an InteractorToken — so summary was undefined and
getCustomResourceInteractors returned at its first line. Silently.

badges
session that created it 1
fresh load of the link (before) 0
fresh load of the link (now) 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 compared resource.summary?.token while currentResource() holds the
resource'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

adamjohnwright and others added 4 commits September 16, 2026 15:17
…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
adamjohnwright enabled auto-merge (squash) September 16, 2026 16:19
@adamjohnwright
adamjohnwright merged commit 5374ecc into main Sep 16, 2026
6 checks passed
@adamjohnwright
adamjohnwright deleted the fix/shared-custom-overlay branch September 16, 2026 18:10
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.

1 participant