Skip to content

Name an owner's nodes by node_ref on the console, never node_id - #610

Merged
Babissimo merged 1 commit into
archive-publishes-node-reffrom
owner-pages-node-ref
Sep 24, 2026
Merged

Babissimo merged 1 commit into
archive-publishes-node-reffrom
owner-pages-node-ref

Conversation

@Babissimo

@Babissimo Babissimo commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

The owner pages on app.retina.fm still put the private node_id on screen:

  • Connect your node listed it in a Node ID column next to the Node ref column (Show each owned node's node_ref on My Nodes, in place of its name #521 added the ref beside the id).
  • /api/auth/me/nodes set an unnamed or offline node's name to its node_id, and Tunnel and My Nodes displayed that name. Both pages also fell back to the id when a node had no ref.

What changes

  • The owner route builds name with public_name, as the public listing does. A node with no name of its own, or whose name is a node id, is called by its ref.
  • The Node ID column is removed. Tunnel labels and searches by name or ref. Where a node has neither, the page shows a dash, as Show each owned node's node_ref on My Nodes, in place of its name #521 already did for a missing ref.
  • The route still returns node_id for the owner's own calls (release, location privacy) and for the link to <node_id>.retnode.com, the node's own site. No page displays it, but that link's href and hover title still name the id, because the site is named after it.

Stacked on #609 (the archive), so the two ship in one deploy.

Verification

  • New tests cover the owner route's name fallback and the Onboarding, Tunnel and Overview labels. All of them except the regression guards fail against the old code.
  • Full suites on the stacked head (both PRs on current main): backend 5078 passed, dashboard 1394 passed. Typecheck, eslint and pre-commit are clean.

🤖 Generated with Claude Code

@claude

This comment has been minimized.

@claude

This comment has been minimized.

The owner pages on app.retina.fm still put the private node_id on screen.
Connect your node listed it in a Node ID column beside the Node ref one,
and /api/auth/me/nodes filled an unnamed node's name with its node_id,
which Tunnel and My Nodes then displayed; they also fell back to the id
themselves when a node had no ref.

The owner route now names a node through public_name, as the public
listing does: a node with no name of its own, or one whose name is a node
id, is called by its ref. The route keeps node_id for the owner's own
calls (release, location privacy, the node's <id>.retnode.com site), but
no page displays it: the Node ID column goes, Tunnel searches and labels
by name or ref, and a node with neither shows a dash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Babissimo
Babissimo changed the base branch from main to archive-publishes-node-ref September 24, 2026 15:34
@claude

claude Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Claude finished @Babissimo's task in 2m 0s —— View job


Code Review

  • Gather context (PR description, changed files)
  • Understand the request (/code-review:code-review on this PR)
  • Run code review over the diff (git diff a332b89 b01659d, base branch archive-publishes-node-ref tip vs this PR's tip)
  • Post findings

Summary

Re-reviewed the full diff independently (backend/routes/auth.py, backend/services/node_refs.py, backend/tests/test_auth_routes.py, and the three dashboard pages + their tests). This confirms the conclusion of the prior review pass on this PR: no bugs found, scope matches the description exactly.

Specific points verified:

  • backend/routes/auth.py:391-401 — ref = owner_identity(nid) computed once, reused for node_ref and as public_name's fallback; node_ids (the owner's full set) passed as known_ids so a configured name equal to any of the owner's own node ids (not just this one) falls back to the ref, matching _names_a_node's widened-registry contract.
  • backend/services/node_refs.py:181 — widening public_name's signature to str | None is safe: /me/nodes (auth.py) is the only caller that can pass a None fallback (unpublished node); the other two call sites (admin.py:742, analytics_refresh.py:442) always pass a non-None ref via if (ref := public_identity(nid))/(ref := public_identity(nid)) guards, so public_name never actually returns None there — including at admin.py:742 where the result feeds PublicLeaderboardRow.name: str (a Pydantic field, extra="forbid"). No runtime risk, and repo CI has no Python static typecheck step (ci.yml only runs tsc --noEmit on the dashboard workspaces), so the wider Python type annotation has no gate to trip either.
  • dashboard/src/pages/user/OnboardingPage.tsx — OwnedNode.name now correctly typed string | null; the field is fetched but not rendered on this page at all (only node_ref is shown), so the widened type is purely for fidelity with the API contract, not a functional change.
  • dashboard/src/pages/user/OverviewPage.tsx:127,189 — both fallback chains (node.name || ref || "—") have ref correctly in scope from the enclosing .map() closure; neither can surface node_id.
  • dashboard/src/pages/user/TunnelLinkPage.tsx — RetnodeLink still receives the raw node_id for href/title (intentional, the site is named after the id); the visible label and search (`${n.name || ""} ${n.node_ref || ""}`) use only name/node_ref.
  • Test coverage: test_auth_routes.py's parametrized test correctly covers both fallback triggers (no name, and name equal to the node's own id); the new OverviewPage.test.tsx, and the updated OnboardingPage.test.tsx/TunnelLinkPage.test.tsx, all explicitly assert node_id never renders — a real regression guard for exactly what this PR fixes.

No changes touch /v1/nodes or backend/pyproject.toml, so the contracts/nodes-v1.openapi.yaml and uv.lock gates from CLAUDE.md don't apply.

I wasn't able to run the backend/dashboard suites in this sandbox (no .venv/node_modules, no network for install), so this is a static review; the PR description's own numbers (5032 backend tests, 1380 dashboard tests, typecheck/eslint/pre-commit clean) weren't independently re-verified.

Branch ·

@Babissimo
Babissimo merged commit 779dfd4 into archive-publishes-node-ref Sep 24, 2026
37 of 55 checks passed
@Babissimo
Babissimo deleted the owner-pages-node-ref branch September 24, 2026 15:39
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