Skip to content

feat(agent): improve session reload and session switching UX#207

Merged
DeadWaveWave merged 4 commits intomainfrom
feat/agent-session-refresh-resume
Apr 30, 2026
Merged

feat(agent): improve session reload and session switching UX#207
DeadWaveWave merged 4 commits intomainfrom
feat/agent-session-refresh-resume

Conversation

@DeadWaveWave
Copy link
Copy Markdown
Owner

💡 Change Scope

  • Small Change: Fast feedback, localized UI/logic, low-risk.
  • Large Change: New feature, cross-boundary logic, runtime-risk (persistence, IPC, lifecycle, recovery).

📝 What Does This PR Do?

Adds agent session reload and session history switching from the node header, then upgrades the session picker so users can recognize sessions by semantic task text instead of opaque session ids.

It also documents the feature under docs/agent/, adds provider-specific session preview extraction, and keeps the current reload/switch semantics intact while improving the list hierarchy and confirmation flow.


🏗️ Large Change Spec (Required if "Large Change" is checked)

1. Context & Business Logic

  • Add Reload session to restart the current agent node against the latest environment without changing node identity.
  • Add Session history to list resumable sessions for the current execution directory and switch the node in place to another session.
  • Make the session list recognizable by preferring semantic session text (title -> preview -> sessionId) instead of leading with raw ids.

2. State Ownership & Invariants

  • Renderer owns only the user intent to reload/switch; main / provider session catalogs remain the source of truth for resumable sessions.
  • Switching authority never depends on preview extraction success; sessionId remains the durable fallback identity.
  • Preview extraction stays bounded and best-effort; renderer never reads provider transcript files directly.

3. Verification Plan & Regression Layer

  • Unit: session catalog preview extraction, display normalization, header action behavior.
  • Contract: agent IPC validation.
  • E2E: header session actions and in-place session switching.
  • Additional note: pnpm pre-commit is not fully green due unrelated flaky arrange E2E cases in the full suite; targeted session-related tests passed and the flaky arrange failures passed when rerun in isolation.

✅ Delivery & Compliance Checklist

  • My code passes the ultimate gatekeeper: pnpm pre-commit is completely green.
  • I have signed the CLA if required (see CLA.md).
  • I have included new tests to lock down the behavior (or explicitly stated why it's untestable).
  • I have strictly adhered to the DEVELOPMENT.md architectural boundaries.
  • I have attached a screenshot or screen recording (if this touches the UI).
  • I have updated the documentation accordingly (if adding a feature or changing a contract).

📸 Screenshots / Visual Evidence

  • UI screenshot not attached from CLI. Session-list UX changes are covered by targeted E2E assertions.

@DeadWaveWave DeadWaveWave merged commit 778d73e into main Apr 30, 2026
7 checks passed
@DeadWaveWave DeadWaveWave deleted the feat/agent-session-refresh-resume branch April 30, 2026 04:52
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