Revise default hidden categories to reduce noise in session view

Change the default-hidden message categories from [thinking,
hook_progress] to [tool_result, system_message, hook_progress,
file_snapshot]. This hides the verbose machine-oriented categories
by default while keeping thinking blocks visible — they contain
useful reasoning context that users typically want to see.

Also rename the "summary" category label from "Summaries" to
"Compactions" to better reflect what Claude's summary messages
actually represent (context-window compaction artifacts).

Tests updated to match the new defaults: the filter test now
asserts that tool_result, system_message, hook_progress, and
file_snapshot are all excluded, producing 5 visible messages
instead of the previous 7.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 10:42:21 -05:00
parent 2a6186e9ce
commit 54f909c80c
2 changed files with 9 additions and 5 deletions

View File

@@ -69,10 +69,12 @@ export const CATEGORY_LABELS: Record<MessageCategory, string> = {
system_message: "System Messages",
hook_progress: "Hook/Progress",
file_snapshot: "File Snapshots",
summary: "Summaries",
summary: "Compactions",
};
export const DEFAULT_HIDDEN_CATEGORIES: MessageCategory[] = [
"thinking",
"tool_result",
"system_message",
"hook_progress",
"file_snapshot",
];

View File

@@ -48,15 +48,17 @@ describe("filters", () => {
expect(filtered.find((m) => m.category === "thinking")).toBeUndefined();
});
it("default filter state has thinking and hooks disabled", () => {
it("default filter state hides tool_result, system, hooks, and snapshots", () => {
const defaultEnabled = new Set(ALL_CATEGORIES);
for (const cat of DEFAULT_HIDDEN_CATEGORIES) {
defaultEnabled.delete(cat);
}
const filtered = filterMessages(messages, defaultEnabled);
expect(filtered.find((m) => m.category === "thinking")).toBeUndefined();
expect(filtered.find((m) => m.category === "tool_result")).toBeUndefined();
expect(filtered.find((m) => m.category === "system_message")).toBeUndefined();
expect(filtered.find((m) => m.category === "hook_progress")).toBeUndefined();
expect(filtered).toHaveLength(7);
expect(filtered.find((m) => m.category === "file_snapshot")).toBeUndefined();
expect(filtered).toHaveLength(5);
});
it("all-off filter returns empty array", () => {