feat: "what changed" in the linked workspace, once when a session starts

SA
19m ago
+374-1

Issue for this PR

No GitHub issue. This is part of the workspace review follow-ups, with backend AltimateAI/altimate-backend#7876 and the VS Code extension's client. Stacked on #1751, which it needs for the TUI's decision toaster.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Everyone on a workspace learns what changed in the skills and knowledge it gives the team, in one line when a session starts. For example: "Since your last session in Growth: 2 skills added (naming, cost-guard), 1 knowledge base removed (Glossary)."

  • workspace-activity.ts:
    • Reads GET /datamates/{id}/activity (#7876: added, updated or removed, last 30 days) and builds the line.
    • Each client (host) keeps its own last look per server, tenant, account and workspace, in the person's state directory (workspace-activity/).
    • The mark is the newest change's server time, and a first look at an empty window stores none, so the local clock is never used.
    • The first look records where to start and says nothing, as decision notices do.
  • GET /altimate/workspace/activity?host=<client> for the IDE extension, behind the usual workspace-route checks.
  • TUI: shows the line a few seconds after startup, after the review-decision replay. The TUI shows one toast at a time, so it waits while a decision toast is up.
  • review-requests.context is exported for it.
  • Docs: usage/cli.md.

How did you verify your code works?

  • Unit: bun test test/altimate/workspace/workspace-activity.test.ts passes 5 of 5:
    • the first look says nothing;
    • the next sends since and returns the line;
    • an empty first look uses no clock;
    • each client keeps its own last look;
    • unsupported servers and signed-out users;
    • the line's grouping, names and plurals.
  • Checks: bun run typecheck is clean, and the marker guard passes.
  • Wider suites: test/cli/tui, test/altimate/rules, test/altimate/workspace and test/server pass apart from failures that clean main has too: three test/server HttpApi timeouts and datamate_manager write that races the link.
  • End to end against a local backend on #7876:
    • The first TUI start recorded the baseline.
    • The owner then approved one of the member's skill updates and removed another skill.
    • On the next start, the decision toast showed first, then "Since your last session in Review e2e: 1 skill removed (cost-guard), 1 skill updated (kept-check)."
  • Independent review: found the local-clock baseline. It's fixed.

Cost side effects

None that grows with user data. It makes one small request per TUI start and per extension connection (limit 20).

Screenshots / recordings

TUI: what changed since the last session

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR
  • I checked for cost side effects (model calls, queries or cloud resources that grow with user data) and described them, or wrote "none"

🤖 Generated with Claude Code


Summary by cubic

Shows a one-line summary of what changed in the linked workspace's skills and knowledge since a client last looked, when a TUI session starts or an extension connects, for example "Since your last session in Growth: 2 skills added (naming, cost-guard), 1 knowledge base removed (Glossary)." The first look only records where to start and says nothing; each client keeps its own last look per server, tenant, account and workspace in the state directory, using server times so a skewed local clock cannot hide or repeat a change. The TUI shows the line a few seconds after startup, after the review-decision replay and only when no decision toast is showing.

Details

  • Adds GET /altimate/workspace/activity?host=<client> for the VS Code extension, behind the usual workspace-route checks.
  • Reads a new backend route (GET /datamates/{id}/activity); servers without it report "unsupported" and show nothing.
  • Makes one small request per TUI start or extension connection (limit 20); docs updated in usage/cli.md.