feat(frontend): restore session progress sidebar

This commit is contained in:
2026-05-22 14:34:45 +08:00
parent e061961a79
commit c671b66043
8 changed files with 1046 additions and 7 deletions

View File

@ -6,6 +6,7 @@ describe('chat store process event ingestion', () => {
beforeEach(() => {
useChatStore.setState({
sessionId: 'web:alpha',
inputDrafts: {},
processRuns: [],
processEvents: [],
processArtifacts: [],
@ -18,6 +19,7 @@ describe('chat store process event ingestion', () => {
afterEach(() => {
useChatStore.setState({
sessionId: 'web:default',
inputDrafts: {},
processRuns: [],
processEvents: [],
processArtifacts: [],
@ -49,4 +51,17 @@ describe('chat store process event ingestion', () => {
}),
]);
});
it('stores input drafts per session', () => {
useChatStore.getState().setInputDraft('web:alpha', 'message for alpha');
useChatStore.getState().setInputDraft('web:beta', 'message for beta');
expect(useChatStore.getState().getInputDraft('web:alpha')).toBe('message for alpha');
expect(useChatStore.getState().getInputDraft('web:beta')).toBe('message for beta');
useChatStore.getState().clearInputDraft('web:alpha');
expect(useChatStore.getState().getInputDraft('web:alpha')).toBe('');
expect(useChatStore.getState().getInputDraft('web:beta')).toBe('message for beta');
});
});