Skip to content

Add a Compact transcript setting - #202

Open
prkl78 wants to merge 1 commit into
hardbeat920:mainfrom
prkl78:compact-transcript
Open

Add a Compact transcript setting#202
prkl78 wants to merge 1 commit into
hardbeat920:mainfrom
prkl78:compact-transcript

Conversation

@prkl78

@prkl78 prkl78 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

What changed

A Compact transcript toggle in Settings → General. When it is on, a work group stays folded behind the summary line that already titles it instead of opening while the turn runs.

Why

A turn that runs a dozen commands pushes the answer off screen, and the steps are rarely what you are reading. The line already says what is happening and how many steps it has taken, so the group opening on top of that is mostly noise. Off by default; nothing changes unless you ask for it.

The auto-open is the only thing the setting removes. Clicking the line still opens the group, a manual override still sticks, and a step waiting on an approval still opens itself, so nothing is ever approved unseen. A lone call with no headline never formed a group, so it is unaffected.

Follows the shape of the existing Anchor prompts to top setting: flag in appearance.ts, a useTranscript* hook, one Row in GeneralPage.

UI

Same transcript, with the setting off and on:

Off On
Running 9 commands + 10 rows Running 9 commands
before after

Checklist

  • I ran npm run check
  • This PR is small and focused
  • I did not mix unrelated changes

Note on the first box: tsc --noEmit is clean and the tests covering this change pass. Four test files (ModelPicker, SkillsPage, useInboxUnseen, linkedSessionSeen) fail for me on a clean main as well, with localStorage undefined under happy-dom on Node 26 — unrelated to this change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a General settings toggle for compact transcripts.
    • Compact mode keeps active work folded behind a summary showing the current phase, activity indicator, and step count.
    • Click a summary to expand its details; approval-waiting activity opens automatically.
    • Compact transcript preference is saved and restored across sessions.
  • Bug Fixes

    • Updated active transcript groups to remain collapsed in compact mode unless approval is required or manually expanded.

Settings → General → Compact transcript keeps a work group folded
behind the summary line that already titles it, instead of opening it
while the turn runs. A busy turn then reads as one row rather than a
scrolling wall of steps.

The auto-open was the only thing removed: clicking the line still opens
the group, an override still sticks, and a step waiting on an approval
still opens itself so nothing is approved unseen. A lone call with no
headline never formed a group, so it is unaffected.

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

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: dc941369-d664-4e61-864a-858b4f00d872

📥 Commits

Reviewing files that changed from the base of the PR and between 08ba69d and ef493a6.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • src/hooks/useTranscriptCompact.ts
  • src/lib/appearance.test.ts
  • src/lib/appearance.ts
  • src/surfaces/AgentTranscript.test.ts
  • src/surfaces/AgentTranscript.tsx
  • src/surfaces/SettingsView.tsx

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change adds a persisted compact-transcript preference, a General settings toggle, and transcript behavior that folds active work while keeping approval-waiting groups open.

Changes

Compact transcript

Layer / File(s) Summary
Preference storage and observation
src/lib/appearance.ts, src/lib/appearance.test.ts, src/hooks/useTranscriptCompact.ts
Adds local-storage helpers, a change event, persistence tests, and a hook that tracks preference changes.
General settings integration
src/surfaces/SettingsView.tsx
Adds the Compact transcript toggle and persists its value.
Transcript folding behavior
src/surfaces/AgentTranscript.tsx, src/surfaces/AgentTranscript.test.ts, CHANGELOG.md
Folds active work in compact mode, keeps approval-waiting groups open, and adds coverage and changelog documentation.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SettingsView
  participant appearance
  participant useTranscriptCompact
  participant AgentTranscript
  SettingsView->>appearance: saveTranscriptCompact(value)
  appearance->>useTranscriptCompact: dispatch preference change
  useTranscriptCompact->>AgentTranscript: update compact state
  AgentTranscript->>AgentTranscript: keep active phase collapsed unless approval is waiting
Loading

Suggested reviewers: hardbeat920

Merge Risk: ⚪ Minimal · up to ef493

The compact transcript toggle preserves approval expansion and manual control as intended. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 6 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding a Compact transcript setting.
Description check ✅ Passed The description covers what changed, why it changed, UI impact, implementation scope, checklist status, and test limitations. It matches the required template and explains the unrelated existing test …
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 6 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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