fix: harden and de-slop the merged contribution batch
Follow-ups promised on merge, plus review findings on the batch itself: - chat: task-tool output now respects the 512KiB render cap; quick-open icon is visible at rest on coarse pointers and reachable by keyboard (row keydown no longer swallows inner-button Enter/Space); composer inline-code decoration drops the metric-shifting padding; a btw fork send carries only the boundary instruction, never the promotion notice - sync: cascade revert/unrevert aborts busy descendants, busy state is read from every child store at the moment of use; rule 9 documents redo clearing all descendant revert markers - electron: renderer recovery keeps memory-eviction (a valid render-process-gone reason) and both windows share one attachRendererRecovery helper - vscode: process registry is a thin re-export of the web module (provider-env-aliases precedent) with ordered register/unregister writes and an awaited close - server/cli: managed-process registry takes injectable deps (fixes the unreaped-orphans ReferenceError), corrupt settings errors name the file, getWorktrees test restores console.warn - tests: module-mock harnesses removed (AgentsSidebar, SettingsView mobile focus — behaviors stay live but uncovered, accepted trade), QuestionMarkdown asserts rendered DOM - i18n: German gains the debug-panel request keys, Japanese/German drop removed worktree keys, Ukrainian unit spacing fixed - changelog: Copilot AI Credits entries (main + VS Code)
This commit is contained in:
@@ -58,7 +58,7 @@ mock.module('@/sync/sync-refs', () => ({
|
||||
}),
|
||||
}));
|
||||
|
||||
const { btwSessionTitle, startBtwSession, destroyBtwSession, promoteBtwSession, filterBtwTailMessages, findLastCompletedAssistantMessageID, BTW_BOUNDARY_INSTRUCTION } =
|
||||
const { btwSessionTitle, startBtwSession, destroyBtwSession, promoteBtwSession, filterBtwTailMessages, findLastCompletedAssistantMessageID, BTW_BOUNDARY_INSTRUCTION, BTW_PROMOTION_NOTICE, buildBtwSyntheticTexts } =
|
||||
await import('@/lib/btw');
|
||||
const { useBtwStore } = await import('@/stores/useBtwStore');
|
||||
|
||||
@@ -304,3 +304,24 @@ describe('promoteBtwSession', () => {
|
||||
expect(currentSessionSwitches).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('buildBtwSyntheticTexts', () => {
|
||||
test('a send routed to an active fork carries only the boundary instruction', () => {
|
||||
// Regression: a promoted parent that opens a new btw fork used to send the
|
||||
// promotion notice into the fork alongside the boundary instruction, telling
|
||||
// the fork both that btw constraints apply and that they no longer apply.
|
||||
expect(buildBtwSyntheticTexts({ isBtwActive: true, isPromotedBtwSession: true }))
|
||||
.toEqual([BTW_BOUNDARY_INSTRUCTION]);
|
||||
expect(buildBtwSyntheticTexts({ isBtwActive: true, isPromotedBtwSession: false }))
|
||||
.toEqual([BTW_BOUNDARY_INSTRUCTION]);
|
||||
});
|
||||
|
||||
test('a promoted session with no active fork carries the promotion notice', () => {
|
||||
expect(buildBtwSyntheticTexts({ isBtwActive: false, isPromotedBtwSession: true }))
|
||||
.toEqual([BTW_PROMOTION_NOTICE]);
|
||||
});
|
||||
|
||||
test('an ordinary session carries neither', () => {
|
||||
expect(buildBtwSyntheticTexts({ isBtwActive: false, isPromotedBtwSession: false })).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user