Repository navigation
Description
What was found
GET /v1/instances/my/instances deliberately strips two capability fields before replying:
// workers/api/src/routes/instances.ts:315
const { boardColumns: _bc, settingsSchema: _ss, ...lightCaps } = fullCaps;with a measured reason on the line above it — the full set cost ~83 KB for 28 instances, and the list only needs the routing fields. That is a considered decision and #617 did not touch it.
What #617 DID find is that my/instances is the only endpoint any consumer of the console's Instance type calls (pages/Dashboard.tsx:31, pages/Browse.tsx:39, pages/InstanceDetail.tsx:304, tabs/TeamworkSection.tsx:116). So InstanceDetail was passing two permanently-undefined props down:
boardColumns: instance?.capabilities?.boardColumns, // always undefined
settingsSchema: instance?.capabilities?.settingsSchema, // always undefinedSettingsTab.tsx:58-60 even documents the intent — "the schema prop is the fast path; the GET also returns fields so the form never depends on a stale instance-list cache" — for an optimisation that has never once fired.
Current state after #617
The two fields were removed from Instance.capabilities and the two pass-throughs deleted. Behaviour is unchanged, because both tabs already read the real values from their own fetch:
BoardTab.tsx:68—serverCols?.length ? serverCols : (columns?.length ? columns : GENERIC_COLUMNS), withserverColsfrom/board.SettingsTab.tsx:127—if (d.fields?.length) setAgentFields(d.fields)from/settings.
But the props themselves (SurfaceCtx.boardColumns / .settingsSchema in lib/surfaces.tsx:56,58, threaded at :184, :200, :338) still exist and now have no supplier at all.
The decision this issue is for
Two coherent options; pick one rather than leaving a prop with no producer:
- Delete the chain. Remove
boardColumns/settingsSchemafromSurfaceCtxand fromBoardTab/SettingsTab's props, so the second fetch is plainly the only path. Cheapest, and honest. - Actually supply it. Fetch the full capabilities on the instance detail route (not the list), so the fast path exists for real. This is the only option that removes the first-paint flicker — the board briefly shows
GENERIC_COLUMNSbefore/boardanswers, and the agent-settings block is briefly empty.
Option 2 is the only one with a user-visible benefit, and it is worth measuring first: both symptoms self-heal within one round trip, which is exactly why nobody has reported them.
Verified vs inferred
- Verified: the strip at
instances.ts:315and its comment; that all fourInstanceconsumers call onlymy/instances; both fallback lines; that no other code path assigns either prop. - Inferred: that the first-paint flicker is perceptible. Not measured — it may be invisible on a fast connection, which would settle this for option 1.
Files: store/console/src/lib/surfaces.tsx, store/console/src/tabs/BoardTab.tsx, store/console/src/tabs/SettingsTab.tsx, workers/api/src/routes/instances.ts
Activity
serge-ivo commentedon Aug 18, 2026
Audit — still LIVE, and the "no supplier" state is now documented in the code itself.
Citation correction: the strip is at
workers/api/src/routes/instances.ts:316, not:315(line 315 is nowconst fullCaps = agentCapabilities({…})). Content unchanged:The props still have no producer.
store/console/src/lib/surfaces.tsx:56,58still declareboardColumns?/settingsSchema?onSurfaceCtx, threaded at:184,:200and:339;SettingsTab.tsx:56,60still takes and seeds fromsettingsSchema. Nothing assigns either —InstanceDetail.tsx:1472now carries the comment "No boardColumns/settingsSchema: my/instances strips both (#617, see lib/types)", which confirms the state deliberately rather than by absence.So the decision this issue exists for is unmade: option 1 (delete the chain) or option 2 (fetch full capabilities on the detail route). The issue's own note still applies — option 2 is the only one with a user-visible benefit, and it is worth measuring the first-paint flicker before choosing, because if it is imperceptible that settles it for option 1.
Leaving open, labels unchanged.
serge-ivo commentedon Aug 29, 2026
Implemented as option 1 — delete the chain (commit 5586ba4).
The decision: option 2 (feed the fast path) was only worth doing if the first-paint flicker was perceptible — and the issue itself noted that was unmeasured and possibly invisible on a fast connection. Deletion is honest and complete.
What was removed:
boardColumns?andsettingsSchema?fromSurfaceContext(lib/surfaces.tsx)columnsprop fromBoardTab(its column resolution simplifies toserverCols ?? GENERIC_COLUMNS)settingsSchemaprop and itsuseStateseed fromSettingsTab(the start value was always[]since no producer ever supplied it)Both tabs still read the real values from
/boardand/settings. No behaviour change — only dead code removed.All gates green (10 150 unit tests pass; only the pre-existing pdf-lib failures).