symcc

Research: why the stored board view is about 3x bigger than view.json #

Task T-828. Kept as a note by T-832.

The question #

The board view that the Claude Code panel stores (its view atom) was about 3 times bigger than view.json, the file the OpenCode host writes. Why?

Short answer #

Nothing is stored twice, and nothing is JSON-encoded twice. Before the fixes, the Claude Code panel's view atom held every done and dropped task in full: its history, details, answer, and the origin's request and evidence. view.json never holds those for finished tasks, because the OpenCode writer runs every task through viewTask, which cuts them out. Those cut-out parts were the whole of the roughly 3x gap.

The fixes (commit da4a9d7e and T-827) removed most of it. A smaller gap remains on purpose: finished tasks changed in the last 2 days stay in full in the atom. Nothing needs fixing unless you want the atom as small as view.json.

Where the difference comes from #

Is the gap still there after T-827? #

Mostly not.

How it was found #

The real board could not be read: the checker's guard refused any command naming .symcc in the main folder. So the numbers come from a made-up board run through the real publish() (with the fake host from tests/fake-host.ts), with view.json written by the real viewFilePanel.

Each made-up finished task had 30 history lines of 300 characters, 2,000 characters of details, a 5,000-character answer on every third task, and a 1,500-character origin. Sizes are in characters (JSON.stringify(...).length).

Board with 230 finished tasks and 15 open ones, all changed recently:

fieldatom before the fixesatom after T-827view.json
tasks4,309,596357,168351,188
archived_done6,0016,0016,001
archived868686
kinds001,744
total4,316,027363,599359,486

What could not be checked #

Possible next step #

Leaving it as it is is fine; T-827 already handles the size. To make the atom as small as view.json every time, store finished tasks always cut down. When one is opened, the Claude task page would read its parts back with withViewParts, the way the OpenCode TUI already does (hooks/opencode/tui.ts, about line 367). Today the Claude page shows a cut-down task's history and details empty. That would be a small change task covering hooks/core/view-slim.ts and the Claude task page.