Skip to content

Show session transcript in menu bar panel#82

Open
sat-sat wants to merge 4 commits intofarzaa:mainfrom
sat-sat:feature/session-transcript-panel
Open

Show session transcript in menu bar panel#82
sat-sat wants to merge 4 commits intofarzaa:mainfrom
sat-sat:feature/session-transcript-panel

Conversation

@sat-sat
Copy link
Copy Markdown

@sat-sat sat-sat commented May 3, 2026

Problem

Once Clicky responds, the conversation is gone — there's no way to
review what was said or copy Claude's response without catching it
in the moment.

Fix

Adds a scrollable THIS SESSION section to the companion panel that
appears after the first voice exchange. Each entry shows:

  • The user's transcript (dim, 2-line max)
  • Claude's response (4-line max) with a copy-to-clipboard button
  • Timestamp of the exchange

The panel auto-scrolls to the latest entry as new exchanges come in.

Privacy

History is in-memory only — nothing is written to disk, no external
services are involved. The transcript disappears when the app quits.

Changes

  • ConversationEntry.swift: new model type (id, userTranscript, assistantResponse, timestamp)
  • CompanionManager.swift: conversationHistory changed to @published so the panel can observe it
  • CompanionPanelView.swift: sessionTranscriptSection and conversationEntryRow views added

sat-sat added 3 commits May 3, 2026 15:59
Adds a scrollable THIS SESSION section to the companion panel that
displays each voice exchange as it happens. User transcript appears
in dim text with a timestamp; Claude's response appears below with
a copy-to-clipboard button. Auto-scrolls to the latest entry.

History is in-memory only — nothing is written to disk.
Moves ConversationEntry into its own file so it can be imported by
both CompanionManager and CompanionPanelView. Makes conversationHistory
@published so the panel can observe and display it in real time.
Adds a timestamp to each entry for the session transcript UI.
Covers field storage, UUID uniqueness across instances, and ID stability
on repeated access — following the existing Swift Testing pattern.
@sat-sat
Copy link
Copy Markdown
Author

sat-sat commented May 4, 2026

Hey @farzaa, I noticed there seems to be a gap between the current state of the repo and the latest downloadable release, particularly around the menu bar panel UI. My changes here are based on what's in the repo, so they may not align with where the UI is heading in the release version.

I'm totally happy to adjust this feature to match the latest release UI, or rethink the approach entirely if you have a different direction in mind for the transcript/history experience. Just let me know what would be most useful. I'm open to iterating on this however works best for the project.

@Qodo-Free-For-OSS
Copy link
Copy Markdown

Hi, CompanionPanelView scrolls only when conversationHistory.count changes, but CompanionManager caps history at 10 by appending then removing the oldest entry; after 10 exchanges the count stays at 10 and autoscroll no longer triggers.

Severity: action required | Category: correctness

How to fix: Observe latest entry id

Agent prompt to fix - you can give this to your LLM of choice:

Issue description

The session transcript auto-scroll stops after the history reaches 10 entries because the view observes conversationHistory.count, which no longer changes due to the append+truncate logic.

Issue Context

CompanionManager caps history at 10 by removing the oldest entry after appending the newest. This keeps conversationHistory.count constant at 10 for exchanges 11+.

Fix Focus Areas

  • leanring-buddy/CompanionPanelView.swift[736-753]
  • leanring-buddy/CompanionManager.swift[686-695]

Implementation direction

Change the scroll trigger to something that changes for every new exchange, e.g. onChange(of: companionManager.conversationHistory.last?.id) (or last?.timestamp) instead of .count, or emit an explicit @Published “didAppendHistoryEntry” token from CompanionManager each time you append.


Found by Qodo code review. FYI, Qodo is free for open-source.

Watching .count stops triggering onChange once history stabilizes at 10
entries; switching to .last?.id fires on every append since each new
ConversationEntry gets a fresh UUID.

Also adds unit tests covering ConversationEntry field storage, UUID
uniqueness, ID stability, and the append+truncate scroll trigger contract.
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.

2 participants