finish T-235 (persisted activity fold level); close T-132 via Q-34

T-235: app-scoped kActivityFoldLevelKey + a claude.activity.fold-level command
that cycles none→tools→thinking→everything; ClaudePane + team_panel_host read it
and re-fold live via the settings notifier. Unit tests for the helpers.

T-132 cleanup: the one blocked item (account/team token budget) is detached
(T-158), reframed as Q-34 'how + when to surface the budget given upstream
doesn't expose it', with T-158 as its backlog resolver. T-132 closed — all
doable work delivered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 19:24:19 +02:00
co-authored by Claude Opus 4.8
parent eb7b738c17
commit 86a52cd731
10 changed files with 173 additions and 1 deletions
@@ -30,6 +30,18 @@ enum FoldLevel {
everything,
}
/// Settings key for the persisted activity-card fold level (T-235). App-scoped:
/// a personal viewing preference, not per-repo.
const String kActivityFoldLevelKey = 'app.claude.activityFoldLevel';
/// Parse a stored fold-level name back to a [FoldLevel], defaulting to L1
/// ([FoldLevel.tools]) for null/unknown values.
FoldLevel foldLevelFromName(String? name) => FoldLevel.values.firstWhere((l) => l.name == name, orElse: () => FoldLevel.tools);
/// The next fold level in the cycle none → tools → thinking → everything → none
/// (T-235), for the toggle command.
FoldLevel nextFoldLevel(FoldLevel level) => FoldLevel.values[(level.index + 1) % FoldLevel.values.length];
/// A unit the conversation view renders: either a single first-class item or
/// a folded run of meta items.
sealed class RenderGroup {