Commit 01e0f3a
fix(corpora-curator): the domain type stops filtering the list, so a slow workspace load can no longer hide every corpus (gh #88)
An operator on humain-vc opened the Corpora Curator and was told they had no
corpora. They have nine theses. The surface had guessed `strategy` for the
domain type, queried `domain.list` with it, got nothing back, and rendered "No
corpora yet" — a sentence indistinguishable from the truth.
Same symptom as the NATS-subject failure earlier this week, entirely different
cause, and this one is ours. The tell was visual rather than logged: the
workspace rendered as a pill instead of a `<select>` while the connection read
`open`, which has exactly one meaning — `workspace.list` never arrived while the
socket stayed healthy. `defaultDomainTypeFor` then fell through to its
`'strategy'` default and poisoned every call downstream.
We fixed this symptom once already, on 2026-07-07. That fix repaired the
SWITCHING path and left the guess in place, so the bug sat dormant for a month
waiting for `workspace.list` to be slow once. Guessing better is not a fix. The
fix is to stop needing the guess.
The list is no longer filtered. `domain.list` is called with `client_slug` only.
`listDomains` in the resolver has always declared `type` as optional and
projected it in the result, so omitting it is the supported shape — the client
was imposing a narrowing the backend never asked for. The types carry no
behavioural difference to narrow on; they are vocabulary preference, reach-edu
saying "strategy" where humain-vc says "thesis", and domains were abstracted
precisely so that any type shows up.
The type now travels with the corpus. A new `callType` getter reads
`active.type` — a property of the thing the operator clicked — and feeds
`domain.assemble`, every `source.*` and `tag.apply`, about fifteen call sites.
`domainType` demotes to the create form's default and nothing else, so a wrong
value can mis-prefill one visible text field the operator can see and change
rather than emptying the surface. The broadcast handler drops its type check for
the same reason, which also fixes a retype OUT of the active type being missed.
Selection keys on `(type, slug)`, because that is the real key —
"apprenticeship" can be a strategy AND a topic. `ACTIVE_STRATEGY_KEY` stores
`type:slug`; bare slugs from before this change still resolve, so nobody loses
their selection on upgrade. Each row grows a type chip so two same-slug corpora
stay tellable apart.
No backend change. Three regression tests pin it, including the one that
matters: a workspace whose summary never arrives at all still sees every corpus
it owns.
Files changed:
- apps/corpora-curator/src/curation.svelte.ts — callType, activeType, the
unfiltered domain.list, the type:slug storage key
- apps/corpora-curator/src/App.svelte — broadcast handler loses its type check;
the header pill reads the selected corpus's own type
- apps/corpora-curator/src/CorpusPicker.svelte — the Type field tracks the
workspace preference until the operator overrides it; per-row type chip
- apps/corpora-curator/src/app.css — .cc-strat-meta, the row that carries it
- apps/corpora-curator/test/curation.test.ts — three regressions
- context-v/issues/Domain-Type-Is-Ambient-State-So-A-Failed-Workspace-Load-Hides-Every-Corpus.md
- changelog/2026-08-08_05_Same-Symptom-Second-Cause-The-Type-Filter-That-Hid-A-Whole-Workspace.md
Closes #88.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZJvZWco3z7SR2dEhFqEjA1 parent 7e435d5 commit 01e0f3a
7 files changed
Lines changed: 460 additions & 57 deletions
File tree
- apps/corpora-curator
- src
- test
- changelog
- context-v/issues
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
73 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
77 | | - | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
24 | 34 | | |
| |||
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 56 | + | |
| 57 | + | |
49 | 58 | | |
50 | 59 | | |
51 | 60 | | |
| 61 | + | |
52 | 62 | | |
53 | 63 | | |
54 | 64 | | |
| |||
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
68 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
69 | 82 | | |
70 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
71 | 87 | | |
72 | 88 | | |
73 | 89 | | |
| |||
85 | 101 | | |
86 | 102 | | |
87 | 103 | | |
88 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
89 | 110 | | |
90 | 111 | | |
91 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
| |||
0 commit comments