feat(runs): rename runs in the UI — user-set title as a pure display overlay (#111) #113
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab!113
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/111"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lets the operator rename any run — live or finished, manual or AFK — from the chat header. The rename is a pure display overlay: a nullable
runs.titlecolumn that never touches identity (session name, branch, worktree, tmux — all stay keyed off the label per ADR-0008).What's in here
Backend
0008_run_title.sql(sqlite + postgres): nullableruns.title.store.Run.Title *string,UpdateRunTitle(nil clears to NULL), andRun.DisplayName()— the shared title-or-session-name fallback.PATCH /api/v1/runs/{id}with{"title": "..."}": trims, empty-after-trim or JSON null clears, >120 runes → 400, unknown fields → 400, auth+CSRF via the operator middleware tree; returns the full updated run and publishesrun.changed` (repo-scoped, same payload shape as the instance service) so other tabs' rails refetch.internal/afk/notify.go, needs-input ininternal/chat/notify.go) name runs viaDisplayName(), so a renamed run's push matches what the operator sees.Frontend
Run.title+updateRun()in the API client;runDisplayTitle()ininstanceLabel.tsimplementstitle || label-title || branch.label · sessionidentity stays visible as secondary text + tooltip for terminal correlation.Docs
Verification
web/: eslint, prettier check, vitest 581/581,tsc --noEmit+ vite build — all green.gofmtclean,go build -tags ui ./cmd/..., fullgo test -tags ui ./...green (incl. new store round-trip/NULL-clear, PATCH validation matrix, SSE-payload, and title-overlay notification tests),golangci-lint run ./...0 issues.Closes #111
🤖 Generated with Claude Code
https://claude.ai/code/session_013FxDEmjMrvPb5N4NeVXHc2
A nullable runs.title column overlays the label-derived display name; identity (session name, branch, worktree, tmux) stays immutable after spawn. PATCH /api/v1/runs/{id} trims, clears on empty/null, caps at 120 runes, and emits run.changed. Inline rename lives in the chat header (pencil-on-hover, empty save reverts to the generated title) with the raw label · session identity as secondary text; rail and History render the new title || label-title || branch chain; both push builders name runs via the shared Run.DisplayName() fallback. ADR-0040 (the issue said 0037, but 0037–0039 were taken) and a CONTEXT.md Title entry pin the vocabulary. Closes #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FxDEmjMrvPb5N4NeVXHc2