← Back to Pull requests

Card: archive the session a closed card asked in #35

Closed
unknown closed this pull request without merging on Nov 19, 2026 16:13 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 10:01 UTC
Author

What this does

Closing a card with the ✕ left the session that question ran in behind in
DSH's list — one entry per shaken question, all of them for the user to tidy
up by hand.

Now the card hands its session to Pointy as it closes, and the plugin
archives it through workspaceRegistry.archiveSession, the same path DSH's
own archive action takes.

  • Only Pointy's own sessions. Nothing is archived unless Pointy created

  • that session for a question. A session the user picked in the card
    ("接着:…") or continued behind the ↗ button stays where it is.
  • A tray checkbox — 「会话结束后自动归档」 / "Archive the Session When

  • Closed" (tray.autoArchive in settings.json, on by default) — turns the
    behaviour off.
  • Running work is never cancelled. If a still-running card is closed

  • through its pill, the archive waits for that session's turn/end instead
    of archiving with stopActivity.
  • The archived session is dropped from Pointy's own title and state caches,

  • so it cannot come back through the card's "接着" list, and the pill path
    archives the same way the ✕ does.

    Sessions are archived, not deleted: DSH's archive set hides them from every
    list and the conversation is still there to unarchive.

    Files

  • desktop/internal/ui/archive.go, services.go, pills.go — a closed

  • card or pill hands its session over when the tray allows it.
  • desktop/internal/agent/agent.go — the archive message to the plugin.

  • desktop/internal/config/settings.go, desktop/internal/ui/tray.go,

  • locales/{en,zh-CN}.json — the checkbox and its two strings.
  • plugin/src/node.ts — archive through the workspace registry, gated on

  • the sessions Pointy started, retried at turn/end.
  • app/card/card.ts, app/bridge/card.ts, app/bridge/mygo.ts (generated)

  • — pass the session to close.

    Testing

  • go test ./... and go vet ./... (Go 1.27.3): all packages pass,

  • including the new ui archive tests, the tray test and the relay test.
  • npm run check (tsc for app, extension, plugin and tools, then

  • node --test): 39/39 pass.
  • Drove the real app on macOS 27 with the -tags e2e build and the repo's

  • tools/fake-plugin.ts, isolated with POINTY_HOME and POINTY_PORT:
    - E2E.OpenGrab → typed a question in the card → the fake plugin
    answered → clicked the card's ✕ → the pet sent
    {"type":"archive","sessionId":"session-fake"}.
    - With "autoArchive": false in settings.json, the same ✕ sent
    nothing.
  • Not exercised by hand: the DSH side of the archive itself (a real

  • workspaceRegistry.archiveSession round trip), which needs DSH with a
    real model. The plugin's call is the guarded one in plugin/src/node.ts;
    it never touches stopActivity, and a WorkspaceActiveSessionError only
    defers the archive to turn/end.

    Notes for review

  • The tray item defaults to on, since that is the behaviour the report asks

  • for; turning it off restores the old behaviour exactly.
  • settings.json gains autoArchive; old files without it keep the default

  • and unknown keys are still preserved, per config.Settings.
  • No issue exists for this yet — happy to open one first if you want the

  • feature tracked separately.

    Diff: 400 lines (+300 / -100) across 5 files Reviewer: HavenXia Review duration: 1812m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 400 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.359
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #35"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.7% (MEDIUM) · Higher = larger blast radius
    44.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.7% · Safe to merge
    17.7%