Add 'Move to Active' button on completed sessions#188
Merged
dhilgaertner merged 2 commits intomainfrom Apr 22, 2026
Merged
Conversation
Closes #186. When a session is `completed`, the session detail view now shows a Move to Active button next to Open in VS Code that flips the status back to `active`. Mirrors the existing Mark as Completed pattern (closure on AppState, helper on SessionService, wired in AppDelegate, button gated on session.status). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dgershman
approved these changes
Apr 22, 2026
Collaborator
dgershman
left a comment
There was a problem hiding this comment.
Code & Security Review
Critical Issues
None.
Security Review
Strengths:
- No new RPC surface or external input handling — reuses the existing
set-statuspathway - The
[weak service]capture inAppDelegate.swift:157correctly avoids retain cycles, matching the pattern used by all adjacent closures - No user input is taken by the button; it passes a known
session.idUUID through an already-validated code path
Concerns:
- None identified
Code Quality
- Clean, minimal change that follows the existing patterns exactly (
completeSession/setSessionInReview→setSessionActive) - The
SessionDetailViewbutton visibility is correctly gated:Mark as Completedshows for.active/.inReview,Move to Activeshows for.completed— mutually exclusive as described - The Manager session guard (
session.id != AppState.managerSessionID) already wraps the entire action-button group, so no additional guard is needed - Good SF Symbol choice (
arrow.uturn.backward.circle) — communicates "undo/revert" intent clearly
Summary Table
| Priority | Issue |
|---|---|
| ✅ | No blocking issues found |
Recommendation: Approve — this is a straightforward, well-scoped addition that reuses existing infrastructure (updateSessionStatus) without introducing new API surface, state, or complexity. The 22 lines added are consistent with established patterns across all four files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #186
Summary
session.status == .completed, that flips the session back toactive..active/.inReview).onSetSessionActiveclosure onAppState,setSessionActive(id:)helper onSessionServicereusing the privateupdateSessionStatus(_:to:), wired inAppDelegate. No new RPC — theset-statushandler and CLI already support arbitrary statuses.Test plan
make build(passes locally)activesession, click Mark as Completed → confirm it disappears and Move to Active appears in its placeactive, button disappears, Mark as Completed reappearssession.id != AppState.managerSessionIDguard wrapping the action-button group)🤖 Generated with Claude Code