Describe the bug
Back button on hypothesis detail pages does not navigate back
To Reproduce
(given a fix for #6)
Open http://localhost:5173/
Click one of the Panels e.g. Problem so the page opens
Click the back button, but no navigation back
Expected behavior
Navigation back to the Readiness Page
Claude tells me ...
3. Back button on hypothesis detail pages does not navigate back
File: tools/dashboard/src/model/types.ts
The Back event was handled in the Stale app state but was completely absent from the Loaded state. Since the app is normally in Loaded, clicking Back fell through to default: return state — no navigation occurred.
Fix: Added the missing case 'Back': to the Loaded branch of the transition function (around line 968):
// Before — no Back case in Loaded state
case 'Loaded':
switch (event._tag) {
case 'SelectPanel': ...
case 'SelectHypothesis': ...
case 'Refresh': ...
case 'FetchError': ...
default:
return state; // Back silently did nothing
}
// After
case 'Loaded':
switch (event._tag) {
case 'SelectPanel': ...
case 'SelectHypothesis': ...
case 'Back':
return { ...state, activePanel: 'readiness', selectedHypothesis: undefined };
case 'Refresh': ...
case 'FetchError': ...
default:
return state;
}
Environment
- OS: Mac Tahoe
- Claude Code version sonnet
- LeanOS version: Core
Additional context
Describe the bug
Back button on hypothesis detail pages does not navigate back
To Reproduce
(given a fix for #6)
Open http://localhost:5173/
Click one of the Panels e.g. Problem so the page opens
Click the back button, but no navigation back
Expected behavior
Navigation back to the Readiness Page
Claude tells me ...
3. Back button on hypothesis detail pages does not navigate back
File:
tools/dashboard/src/model/types.tsThe
Backevent was handled in theStaleapp state but was completely absent from theLoadedstate. Since the app is normally inLoaded, clicking Back fell through todefault: return state— no navigation occurred.Fix: Added the missing
case 'Back':to theLoadedbranch of thetransitionfunction (around line 968):Environment
Additional context