feat(tui): show session workspace (cwd) in the status bar
SessionWorkspaceBoundEvent already recorded the bound workspace root but it was never surfaced. Map it to a new session.workspace_bound frame (sealed ServerMessage variant, auto-registered; re-emitted on reconnect via the snapshot replay), carry it on Session.WorkspaceRoot, and show it home-abbreviated in the status bar (⌂ ~/Programs/correx). Golden test pins the decode.
This commit is contained in:
@@ -74,6 +74,17 @@ func TestDecodeGoldenServerFrames(t *testing.T) {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "session.workspace_bound carries the cwd",
|
||||
json: `{"type":"session.workspace_bound","sessionId":"s1","workspaceRoot":"/home/kami/Programs/correx","sequence":4,"sessionSequence":1}`,
|
||||
wantType: TypeWorkspaceBound,
|
||||
eventBear: true,
|
||||
check: func(t *testing.T, m ServerMessage) {
|
||||
if m.WorkspaceRoot != "/home/kami/Programs/correx" {
|
||||
t.Fatalf("workspaceRoot not decoded: %+v", m)
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "snapshot_complete (non-event control frame)",
|
||||
json: `{"type":"snapshot_complete"}`,
|
||||
|
||||
Reference in New Issue
Block a user