agent-orchestrator/packages/core/src
Ashish Huddar 1bb80ef67c
feat: stable session titles via pinnedSummary metadata (#946)
* feat(core): pin first quality summary for stable session titles

When a session's first non-fallback summary is obtained, persist it to
metadata as pinnedSummary. This prevents the dashboard title from drifting
as the agent generates new summaries each turn.

Changes:
- Add pinnedSummary to SessionMetadata type
- Serialize/deserialize in writeMetadata/readMetadata
- Pin in lifecycle manager's checkSession (correct write path)
- Propagate through restore path

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(web): stable session titles via unified getSessionTitle

Reorder title fallback: PR > issue > branch > summary (was: summary > issue > branch).
Replace inline getSessionHeadline with shared getSessionTitle in both
SessionDetail and page.tsx for consistent behavior across all components.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: coverage for pinnedSummary and title fallback chain

9 new tests:
- 3 serialize tests: pinnedSummary priority over agent/metadata summary
- 5 lifecycle-manager tests: pinning logic guards and error handling
- 1 metadata test: pinnedSummary serialization in writeMetadata

Updated existing tests to match new title fallback order.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: fix mobile title expectations

* fix(web): use pinnedSummary only for title selection, not dashboard.summary

Previously, pinnedSummary was assigned to dashboard.summary in
sessionToDashboard(), causing two problems:
1. enrichSessionAgentSummary() never fetched newer summaries because
   dashboard.summary was already set
2. Every UI surface rendering session.summary showed the stale pinned
   value instead of live agent output

Fix: pinnedSummary is now read only by getSessionTitle() via
session.metadata["pinnedSummary"], keeping title stable without
freezing the live summary field. dashboard.summary always reflects the
current agentInfo or metadata summary.

Addresses review comment on PR #946.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 09:52:48 +05:30
..
__tests__ feat: stable session titles via pinnedSummary metadata (#946) 2026-04-07 09:52:48 +05:30
recovery feat: support multiple concurrent orchestrators with isolated worktrees (#870) 2026-04-04 12:30:51 +05:30
utils fix: preserve project ownership for legacy sessions 2026-03-11 23:27:48 +05:30
activity-log.ts feat: standardize agent plugins — shared hooks, activity JSONL, backfill aider/opencode (#755) 2026-04-01 21:50:07 +05:30
agent-selection.ts feat: support multiple concurrent orchestrators with isolated worktrees (#870) 2026-04-04 12:30:51 +05:30
agent-workspace-hooks.ts feat: standardize agent plugins — shared hooks, activity JSONL, backfill aider/opencode (#755) 2026-04-01 21:50:07 +05:30
atomic-write.ts feat(core): add feedback tools contracts, validation, storage, and dedupe 2026-03-10 22:31:39 +05:30
config-generator.ts fix(notifier): remove desktop notifications from default configs (#962) 2026-04-07 08:59:51 +05:30
config.ts fix(notifier): remove desktop notifications from default configs (#962) 2026-04-07 08:59:51 +05:30
decomposer.ts feat: lifecycle manager, backlog auto-claim, task decomposition, and verification gate (#365) 2026-03-10 12:31:25 +05:30
feedback-tools.ts feat(core): add feedback tools contracts, validation, storage, and dedupe 2026-03-10 22:31:39 +05:30
index.ts revert: remove model rate-limit pause functionality (PR #367) (#908) 2026-04-06 14:58:41 +05:30
key-value.ts feat(core): add feedback tools contracts, validation, storage, and dedupe 2026-03-10 22:31:39 +05:30
lifecycle-manager.ts feat: stable session titles via pinnedSummary metadata (#946) 2026-04-07 09:52:48 +05:30
metadata.ts feat: stable session titles via pinnedSummary metadata (#946) 2026-04-07 09:52:48 +05:30
observability.ts fix: added GraphQL batch PRfeat: add GraphQL batch PR enrichment for orchestrator polling enrichment for orchestrator polling (fixes #608) (#637) 2026-03-30 00:31:04 +05:30
opencode-session-id.ts feat: OpenCode session lifecycle and CLI controls (#315) 2026-03-08 09:55:44 +05:30
orchestrator-prompt.ts fix: correct ao send --no-wait wording per review 2026-03-27 20:50:13 +05:30
orchestrator-session-strategy.ts feat: OpenCode session lifecycle and CLI controls (#315) 2026-03-08 09:55:44 +05:30
paths.ts feat: add end-to-end observability across core, web, and terminal (#436) 2026-03-12 16:57:40 +05:30
plugin-registry.ts fix: address illegalcall review comments 2026-04-03 22:09:24 +05:30
prompt-builder.ts feat: lifecycle manager, backlog auto-claim, task decomposition, and verification gate (#365) 2026-03-10 12:31:25 +05:30
scm-webhook-utils.ts feat: add SCM webhook lifecycle triggers (#394) 2026-03-11 10:34:41 +05:30
session-manager.ts feat: stable session titles via pinnedSummary metadata (#946) 2026-04-07 09:52:48 +05:30
tmux.ts fix: increase delays in spawn prompt submission to ensure Enter is processed (#62) 2026-02-16 20:31:07 +05:30
types.ts feat: stable session titles via pinnedSummary metadata (#946) 2026-04-07 09:52:48 +05:30
utils.ts Publish ao-web on npm, harden error handling, deduplicate code 2026-03-14 19:01:49 +05:30