Skip to content

fix(jobs): name the hosting by its domain, not its id - #211

Merged
nechodom merged 1 commit into
mainfrom
claude/user-friendly-naming-cdcdcb
Oct 5, 2026
Merged

nechodom merged 1 commit into
mainfrom
claude/user-friendly-naming-cdcdcb

Conversation

@nechodom

@nechodom nechodom commented Oct 5, 2026

Copy link
Copy Markdown
Owner

What

Job pages showed the hosting's UUID as the subject ("target 01a0f15b-…", "← Back to 01a0f15b-…") instead of its domain.

Why

Most per-hosting forms post the hosting id as selector, and spawn_job stored that verbatim as the job's target.

Changes

  • spawn_job: an id-shaped target (UUID) is resolved to the hosting's domain via the cluster-wide list_hostings before JobStart. Covers all ~30 call sites at once. For hosting_delete this matters most: once the site is gone the domain is the only name left.
  • Legacy rows: /jobs, /jobs/<id> and /jobs/<id>/progress resolve id targets at render time. One listing per batch, and no RPC at all when no row holds an id — so the 2 s progress poll is unchanged for new jobs. Hostings deleted before this change can't be resolved and keep their id.
  • JobView::hosting_target: a finished hosting_delete no longer renders the back link (it pointed at a 404). Failed/running deletes keep it.

Reviewer notes

  • _hosting_jobs_panel already matches a job's target against both id and domain, so storing the domain doesn't hide running jobs there.
  • /hostings/<domain> resolves the same as /hostings/<id>, so back links still work.
  • Tests: looks_like_hosting_id shape test; hosting_target delete-state test. cargo test -p hyperion-web + clippy clean. Not walked in the dev panel (stub can't delete a real hosting).

🤖 Generated with Claude Code

Per-hosting forms post the hosting id as their selector and spawn_job
stored it verbatim as the job's subject, so job pages read
"target 01a0f15b-…" and "← Back to 01a0f15b-…".

- spawn_job resolves an id-shaped target to the hosting's domain before
  storing it; after a delete the domain is the only name left.
- /jobs, /jobs/<id> and the progress fragment resolve ids on older rows
  at render time (one cluster listing, skipped when no row needs it).
- A finished hosting_delete no longer offers a back link to a 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nechodom
nechodom merged commit 695ff63 into main Oct 5, 2026
1 check passed
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