Skip to content

Send field-specific context for session metadata regen - #1181

Merged
arul28 merged 2 commits into
mainfrom
ade/session-metadata-generation
Aug 29, 2026
Merged

Send field-specific context for session metadata regen#1181
arul28 merged 2 commits into
mainfrom
ade/session-metadata-generation

Conversation

@arul28

@arul28 arul28 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Status-only regenerate now sends lane name, chat title, worktree folder, and the last assistant paragraphs — not the full transcript, sibling threads, or git dump — and copies the current title and lane name unchanged.
  • Title-only still uses this thread's transcript; lane-name still uses sibling threads plus git vs remote. Work surfaces shimmer the requested fields in place while generation runs.
  • Lane-name-only no longer stamps this chat's kickoff slug onto the shared lane when models miss.

Test plan

  • sessionNaming.test.ts — lean status-only prompt, title-only omits git, field-aware system prompt
  • sessionMetadataService.test.ts — gather skips, title-only fallback uses transcript, lane-only does not rename from kickoff
  • SessionCard.test.tsx / WorkSurfaceHeader.test.tsx / SessionListPane.test.tsx — in-place Naming… / Writing status… masks
  • agentChatService.test.ts -t regenerateSessionMetadata

Note

Medium Risk
Changes lane rename inputs (git + sibling threads) and fallback behavior when AI is unavailable; UI is mostly ephemeral loading state, but wrong lane naming could affect shared lane identity.

Overview
Session metadata regeneration now gathers context and builds prompts based on which fields the user asked to refresh (title, lane name, status line), while still returning all three JSON fields in one model call.

  • Title uses this thread’s clipped full transcript; status uses a lean prompt with lane/chat/worktree identity plus the last 2–3 assistant paragraphs (not the full transcript, sibling threads, or git); lane name uses other threads in the lane plus git diff vs baseRef (commits, changed files, uncommitted).
  • System prompts and user prompts tell the model to copy unchanged fields when only a subset is requested. Deterministic fallback no longer applies the kickoff slug to lane-name-only regen when models are unavailable (title fallback can still use conversation text).

Work UI tracks in-flight regen per session/field via sessionMetadataGeneratingStore, masking title, lane, and status with the same “Naming …” shimmer used for auto-created lanes (useLaneNamePending merges auto-create and explicit lane-name regen).

Docs for chat metadata and terminals surfaces are updated to match.

Reviewed by Cursor Bugbot for commit 7cb3a7d. Configure here.

Status-only refresh now gets lane and chat identity plus the latest assistant paragraphs instead of the full transcript and git dump, and Work surfaces shimmer the requested fields while generation runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Aug 29, 2026 6:59pm

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 40 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bf19b268-9c37-4003-b125-8cee028031a7

📥 Commits

Reviewing files that changed from the base of the PR and between 48a1e15 and 4705872.

⛔ Files ignored due to path filters (3)
  • docs/features/chat/README.md is excluded by !docs/**
  • docs/features/terminals-and-sessions/README.md is excluded by !docs/**
  • docs/features/terminals-and-sessions/ui-surfaces.md is excluded by !docs/**
📒 Files selected for processing (16)
  • apps/desktop/src/main/services/chat/agentChatService.ts
  • apps/desktop/src/main/services/chat/sessionMetadataService.test.ts
  • apps/desktop/src/main/services/chat/sessionMetadataService.ts
  • apps/desktop/src/main/services/chat/sessionNaming.test.ts
  • apps/desktop/src/main/services/chat/sessionNaming.ts
  • apps/desktop/src/renderer/components/terminals/LaneChip.tsx
  • apps/desktop/src/renderer/components/terminals/LaneNamingLabel.tsx
  • apps/desktop/src/renderer/components/terminals/SessionCard.test.tsx
  • apps/desktop/src/renderer/components/terminals/SessionCard.tsx
  • apps/desktop/src/renderer/components/terminals/SessionContextMenu.tsx
  • apps/desktop/src/renderer/components/terminals/SessionListPane.tsx
  • apps/desktop/src/renderer/components/terminals/TerminalsPage.tsx
  • apps/desktop/src/renderer/components/work/WorkSurfaceHeader.test.tsx
  • apps/desktop/src/renderer/components/work/WorkSurfaceHeader.tsx
  • apps/desktop/src/renderer/index.css
  • apps/desktop/src/renderer/state/sessionMetadataGeneratingStore.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@arul28 arul28 changed the title Session Metadata Generation -> main Send field-specific context for session metadata regen Aug 29, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7cb3a7d. Configure here.

Comment thread apps/desktop/src/main/services/chat/sessionMetadataService.ts Outdated
Comment thread apps/desktop/src/renderer/components/work/WorkSurfaceHeader.tsx
Also skip the header land shimmer when a title regen finishes without changing the name.

Co-authored-by: Cursor <cursoragent@cursor.com>
@arul28
arul28 merged commit c4512d6 into main Aug 29, 2026
37 checks passed
@arul28
arul28 deleted the ade/session-metadata-generation branch August 29, 2026 19:15
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