Skip to content

host: Fix Edit Template for prefix RRIs - #5846

Draft
backspace wants to merge 1 commit into
mainfrom
cs-12198-edit-template-rri
Draft

host: Fix Edit Template for prefix RRIs#5846
backspace wants to merge 1 commit into
mainfrom
cs-12198-edit-template-rri

Conversation

@backspace

Copy link
Copy Markdown
Contributor
Claude explanation`identifyCard` reports a module in canonical form, so for a realm reached through a registered prefix it is an identifier rather than a URL. Edit Template parsed it as a URL, which throws — selecting any card whose type lives in the base, catalog or skills realm and asking to edit its template did nothing.

Pass the identifier through instead. updateCodePath already accepts one and resolves it, so nothing else has to change; the parse was the whole bug.

An audit of the other consumers found no second instance: of the nineteen identify / identifyCard call sites in the host, this was the only one feeding a module into new URL. The one other place that parses a code ref's module, serializers/code-ref.ts, guards on the identifier being URL-shaped first.

`identifyCard` reports a module in canonical form, so for a realm reached
through a registered prefix it is an identifier rather than a URL. Edit Template
parsed it as a URL, which throws — selecting any card whose type lives in the
base, catalog or skills realm and asking to edit its template did nothing.

Pass the identifier through instead. `updateCodePath` already accepts one and
resolves it, so nothing else has to change; the parse was the whole bug.

An audit of the other consumers found no second instance: of the nineteen
`identify` / `identifyCard` call sites in the host, this was the only one
feeding a module into `new URL`. The one other place that parses a code ref's
module, `serializers/code-ref.ts`, guards on the identifier being URL-shaped
first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files      1 suites   1h 56m 46s ⏱️
4 369 tests 4 355 ✅ 14 💤 0 ❌
4 388 runs  4 374 ✅ 14 💤 0 ❌

Results for commit c06fd78.

Realm Server Test Results

    1 files      1 suites   15m 9s ⏱️
2 206 tests 2 205 ✅ 0 💤 1 ❌
2 289 runs  2 288 ✅ 0 💤 1 ❌

Results for commit c06fd78.

For more details on these errors, see this check.

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