feat(session): stage legacy workflow cutover#26
Conversation
There was a problem hiding this comment.
Pull request overview
This PR stages the cutover from legacy session/local-proxy workflows toward a sessionless attribution workflow across CLI, frontend navigation, and documentation.
Changes:
- Adds new sessionless CLI commands (
init,sync,doctor) and hides/retire legacy session commands behind migration errors. - Replaces primary frontend “Sessions” navigation with an “Attribution” landing page while keeping session pages as legacy/debug views.
- Adds a staged cutover design/plan and updates architecture/CLI docs to describe the new formal workflow.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates top-level workflow description to sessionless CLI commands. |
| frontend/src/views/sessions/SessionListView.vue | Marks sessions list as legacy/debug. |
| frontend/src/views/sessions/SessionDetailView.vue | Marks session detail as legacy/debug. |
| frontend/src/views/DashboardView.vue | Renames the active sessions dashboard metric. |
| frontend/src/views/attribution/AttributionLandingView.vue | Adds attribution landing page. |
| frontend/src/router/index.ts | Adds /attribution route. |
| frontend/src/components/AppSidebar.vue | Replaces Sessions nav with Attribution. |
| frontend/src/tests/session-list-view.test.ts | Adds assertions for legacy sessions copy. |
| frontend/src/tests/session-detail-view.test.ts | Adds assertions for legacy session detail copy. |
| frontend/src/tests/router.test.ts | Adds attribution route test fixture/assertion. |
| frontend/src/tests/dashboard-view.test.ts | Updates dashboard metric copy expectations. |
| frontend/src/tests/app-sidebar.test.ts | Updates sidebar tests for Attribution nav. |
| docs/superpowers/specs/2026-05-14-legacy-session-staged-cutover-design.md | Adds staged cutover design. |
| docs/superpowers/plans/2026-05-14-legacy-session-staged-cutover.md | Adds implementation plan and verification notes. |
| docs/architecture.md | Updates architecture status for sessionless formal workflow. |
| docs/ae-cli/session-pr-attribution.md | Downgrades legacy session attribution runbook. |
| ae-cli/README.md | Adds primary sessionless CLI workflow. |
| ae-cli/cmd/version_test.go | Removes legacy behavior tests and adjusts remaining coverage. |
| ae-cli/cmd/test_helpers_test.go | Adds shared CLI test helpers. |
| ae-cli/cmd/sync.go | Adds public sessionless sync command. |
| ae-cli/cmd/stop.go | Retires stop command implementation. |
| ae-cli/cmd/start.go | Retires start command while keeping proxy internal command. |
| ae-cli/cmd/shell.go | Retires shell command implementation. |
| ae-cli/cmd/run.go | Retires run command implementation. |
| ae-cli/cmd/ps.go | Retires ps command implementation. |
| ae-cli/cmd/kill.go | Retires kill command implementation. |
| ae-cli/cmd/init.go | Adds public sessionless init command. |
| ae-cli/cmd/flush.go | Retires flush command implementation. |
| ae-cli/cmd/flush_test.go | Removes old flush command tests. |
| ae-cli/cmd/doctor.go | Adds public sessionless doctor command. |
| ae-cli/cmd/cutover_test.go | Adds cutover command tests. |
| ae-cli/cmd/cutover_helpers.go | Adds shared cutover helper functions. |
| ae-cli/cmd/attach.go | Retires attach command implementation. |
Comments suppressed due to low confidence (2)
ae-cli/cmd/doctor.go:38
- The new
doctorcommand reports repo/login/state information but never verifies whether the shared git hooks are installed or point at the AE hook runner. That meansae-cli doctorcan complete successfully even whenae-cli initdid not install the hooks, so users may think sessionless attribution is ready while checkpoint uploads will never run.
if _, err := os.Stat(ctx.attributionRoot); err == nil {
fmt.Fprintf(out, " State Exists: true\n")
} else if os.IsNotExist(err) {
fmt.Fprintf(out, " State Exists: false\n")
} else {
return fmt.Errorf("stat attribution state dir: %w", err)
}
return nil
ae-cli/cmd/sync.go:30
- The public
synccommand runs the current scanner, but that scanner persists an emptyScanStateand walks all Codex/Claude/Kiro artifact files under the user's home directory on every invocation. Exposing this as the primary manual sync path will repeatedly rescan and attempt to re-upload all historical artifacts, which can become very slow for long-lived developer machines even though the backend dedupes rows.
engine := newSyncEngine(apiClient)
if err := engine.RunForWorkspace(context.Background(), ctx.repoRoot); err != nil {
return fmt.Errorf("run attribution sync: %w", err)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| </div> | ||
| <div class="rounded-lg bg-white p-6 shadow"> | ||
| <p class="text-sm font-medium text-gray-500">Active Sessions</p> | ||
| <p class="text-sm font-medium text-gray-500">Tracked Workflows</p> |
There was a problem hiding this comment.
Addressed later in the stacked runtime-cutover PRs, not in this entrypoint-staging slice. At this point in the stack the frontend label change intentionally landed before the backend metric source was updated; the end-to-end tracked_workflows data source is switched in the later runtime-cutover PR.
| if err := os.MkdirAll(ctx.attributionRoot, 0o700); err != nil { | ||
| return fmt.Errorf("create attribution state dir: %w", err) | ||
| } | ||
| if err := installSharedHooks(ctx.repoRoot, bestEffortSelfPath()); err != nil { |
There was a problem hiding this comment.
Addressed later in the stacked runtime-cutover PRs, not in this entrypoint-staging slice. init only installs the shared hook runner here; the actual sessionless hook behavior change lands later when post-commit/post-rewrite stop requiring the legacy marker/session path.
| fmt.Fprintf(out, " Git Dir: %s\n", ctx.gitDir) | ||
| fmt.Fprintf(out, " Git Common: %s\n", ctx.gitCommonDir) | ||
| fmt.Fprintf(out, " State Dir: %s\n", ctx.attributionRoot) | ||
| fmt.Fprintf(out, " Logged In: %t\n", token != "") |
There was a problem hiding this comment.
Partially addressed in 0b0a5ae: doctor now also reports whether the shared git hooks are installed and point at the AE hook runner. I did not add live token validation or backend reachability checks in this PR because that would widen the cutover-entrypoint scope beyond the current staging change.
Summary
Test Plan
cd ae-cli && go test ./cmd -count=1cd frontend && pnpm test