fix(settings): use the host's @deepseek-ai/schemastery so volatile prefs apply
Every side-card switch was dead: settings.update returned OK and cordis.patch.yml was written, yet the running plugin never saw the new value and nothing reported an error. Root cause: the plugin declared Config with the plain npm `schemastery` (3.18.0), which has no volatile support. The host resolves plugin config via `runtime.Config['~standard'].validate()` — i.e. the plugin's OWN schemastery — so `meta.volatile` nodes were never wrapped in cosmokit volatile references. `cordis-plugin-loader`'s `_commitVolatile()` bails out as soon as `volatileEntries(fiber.config)` is empty, so every volatile-only edit was silently dropped: no in-place update, no plugin restart. Fix: import z from '@deepseek-ai/schemastery' (peer provided by the host at mount; pinned 3.18.4 as a devDependency for the dev tree), matching the repo's existing pnpm-workspace convention for @deepseek-ai/* peers. Verified: probe reports tabsIsVolatile=true and revision climbing 0->6 across six writes, each read-back matching the written value (previously the value was frozen and revision stuck at 1). Also in this change: - apes tab ids lose their colon (apes:tasks -> apesTasks, ...): the host's settings projection dropped map keys containing a colon. - sidebar prefs ns follows the profile entry id (`better-sidebar`). - subagent rows degrade to summary rows when the root catalog never hydrates. - docs/feedback-0.2.0-rc2-contract-gaps.md: four host contract gaps, gap 4 documenting the silent volatile-write drop above. Gates: typecheck 0, lint 0, build 0, test 131 files / 1385 passed.
This commit is contained in:
1 parent
043340eb02
commit
aa8f417aa3
11 files changed
+320
-141
No files matched your search
+13
-13
@@ -2,7 +2,7 @@
|
||||
* apes:* tab registration tests (Phase 1/1b → C7: 5 tabs). The fork registers
|
||||
* its information-layer tabs (tasks / agents / apps / messages / profile)
|
||||
* through the same BetterSidebarService the upstream builtins use (dogfood).
|
||||
* `apes:tasks` is back (C7 reversal of C6): the native DSH session tree focuses
|
||||
* `apesTasks` is back (C7 reversal of C6): the native DSH session tree focuses
|
||||
* ONE lineage, while this panel is a flat, whole-workspace list with a running
|
||||
* badge and an idle filter — the overlap is complementary.
|
||||
*
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
tasksShowInactive,
|
||||
} from '../src/client/apes/tabs.tsx'
|
||||
|
||||
const APES_TAB_IDS = ['apes:agents', 'apes:apps', 'apes:messages', 'apes:profile', 'apes:tasks']
|
||||
const APES_TAB_IDS = ['apesAgents', 'apesApps', 'apesMessages', 'apesProfile', 'apesTasks']
|
||||
|
||||
function setup(): {
|
||||
service: ReturnType<typeof createBetterSidebarService>
|
||||
@@ -119,10 +119,10 @@ describe('apes:* tab registrations', () => {
|
||||
try {
|
||||
const orders = {
|
||||
tasks: service.getTab(TASKS_TAB_ID)?.order,
|
||||
agents: service.getTab('apes:agents')?.order,
|
||||
apps: service.getTab('apes:apps')?.order,
|
||||
messages: service.getTab('apes:messages')?.order,
|
||||
profile: service.getTab('apes:profile')?.order,
|
||||
agents: service.getTab('apesAgents')?.order,
|
||||
apps: service.getTab('apesApps')?.order,
|
||||
messages: service.getTab('apesMessages')?.order,
|
||||
profile: service.getTab('apesProfile')?.order,
|
||||
}
|
||||
// C8: order 40-50 places apes tabs immediately after the native builtins
|
||||
// (10-35), not in a far-away 900+ band — visual unity in the tab strip.
|
||||
@@ -149,7 +149,7 @@ describe('apes:* tab registrations', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('apes:tasks plugin toggles', () => {
|
||||
describe('apesTasks plugin toggles', () => {
|
||||
it('declares the showInactive switch under the tasks descriptor', () => {
|
||||
const descriptor = apesTabs.find(d => d.id === TASKS_TAB_ID)
|
||||
const toggles = descriptor?.settings?.pluginToggles ?? []
|
||||
@@ -166,7 +166,7 @@ describe('apes:tasks plugin toggles', () => {
|
||||
expect(tasksShowInactive(store)).toBe(true)
|
||||
})
|
||||
|
||||
it('reads the boolean from pluginSettings[apes:tasks]', () => {
|
||||
it('reads the boolean from pluginSettings[apesTasks]', () => {
|
||||
const store = {
|
||||
getPrefs: () => ({ pluginSettings: { [TASKS_TAB_ID]: { [TASKS_SHOW_INACTIVE_KEY]: false } } }),
|
||||
} as unknown as TabComponentProps['store']
|
||||
@@ -183,7 +183,7 @@ describe('apes:tasks plugin toggles', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('apes:tasks row selection (PURE)', () => {
|
||||
describe('apesTasks row selection (PURE)', () => {
|
||||
it('ranks current first, then running, then idle', () => {
|
||||
const list = snap('idle-b', [
|
||||
row('idle-a'),
|
||||
@@ -219,7 +219,7 @@ describe('apes:tasks row selection (PURE)', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('apes:agents badge + topology count', () => {
|
||||
describe('apesAgents badge + topology count', () => {
|
||||
it('counts the subagents of the current session tree only', () => {
|
||||
const list = snap('main', [
|
||||
row('main'),
|
||||
@@ -251,12 +251,12 @@ describe('apes badge contract', () => {
|
||||
})
|
||||
|
||||
it('badges the agents tab with the subagent count, null when childless', () => {
|
||||
expect(badgeOf('apes:agents', snap('main', [row('main'), row('c1', { origin: 'subagent', parentId: 'main' })]), 'main')).toBe(1)
|
||||
expect(badgeOf('apes:agents', snap('main', [row('main')]), 'main')).toBeNull()
|
||||
expect(badgeOf('apesAgents', snap('main', [row('main'), row('c1', { origin: 'subagent', parentId: 'main' })]), 'main')).toBe(1)
|
||||
expect(badgeOf('apesAgents', snap('main', [row('main')]), 'main')).toBeNull()
|
||||
})
|
||||
|
||||
it('never badges the placeholder/static tabs', () => {
|
||||
for (const id of ['apes:apps', 'apes:messages', 'apes:profile']) {
|
||||
for (const id of ['apesApps', 'apesMessages', 'apesProfile']) {
|
||||
expect(apesTabs.find(d => d.id === id)?.badge, `${id} badge`).toBeUndefined()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user