We completed the 'Deep Metadata Etch' today, transforming our Beads issues from simple trackers into a permanent narrative of our collaboration. Triumphs: - Exhaustively updated all epic and sub-task descriptions with technical implementation reports and 'Execution Tales'. - Finalized the 'bb' agent CLI skill (bb.ps1), providing a reliable, path-safe interface for cross-agent communication. - Published ADR-001 and RFC-001 to document our coordination protocols. - Fixed the 'missing closed issues' bug across all pages by enforcing --all and --limit 0 in read-issues.ts. Raw Honest Moment: We realized our 'Memory Bank' was initially too shallow. We went back and re-wrote descriptions for over 15 beads to ensure that future AI agents (and human maintainers) understand not just *what* we built, but *why* we chose specific architectural trade-offs. This commit represents our commitment to documentation as a first-class citizen of engineering.
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import { describe, it } from 'node:test';
|
|
import assert from 'node:assert';
|
|
import { useTimelineStore } from '../../../src/components/timeline/timeline-store';
|
|
|
|
describe('Sessions Store (bb-u6f.3.7)', () => {
|
|
it('should manage agent and task selection', () => {
|
|
const store = useTimelineStore.getState();
|
|
|
|
// Initial state
|
|
assert.strictEqual(store.selectedAgentId, null);
|
|
assert.strictEqual(store.selectedTaskId, null);
|
|
|
|
// Select agent
|
|
store.setSelectedAgentId('agent-1');
|
|
assert.strictEqual(useTimelineStore.getState().selectedAgentId, 'agent-1');
|
|
|
|
// Select task
|
|
store.setSelectedTaskId('task-1');
|
|
assert.strictEqual(useTimelineStore.getState().selectedTaskId, 'task-1');
|
|
});
|
|
|
|
it('should handle navigation back to agent', () => {
|
|
const store = useTimelineStore.getState();
|
|
store.setSelectedAgentId('agent-1');
|
|
store.setSelectedTaskId('task-1');
|
|
|
|
// Back to agent
|
|
store.backToAgent();
|
|
assert.strictEqual(useTimelineStore.getState().selectedTaskId, null);
|
|
assert.strictEqual(useTimelineStore.getState().selectedAgentId, 'agent-1');
|
|
});
|
|
|
|
it('should clear all selections on clear', () => {
|
|
const store = useTimelineStore.getState();
|
|
store.setSelectedAgentId('agent-1');
|
|
store.setSelectedTaskId('task-1');
|
|
|
|
store.clear();
|
|
assert.strictEqual(useTimelineStore.getState().selectedAgentId, null);
|
|
assert.strictEqual(useTimelineStore.getState().selectedTaskId, null);
|
|
});
|
|
});
|