Skip to content

'[Bug] 'Back button on hypothesis detail pages does not navigate back' #7

Description

@davidhawdale

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions