Skip to content

Commit bb86e83

Browse files
committed
Remove dead session wall-clock plumbing
The status bar no longer shows a session timer, so drop useSessionClock, its tests, and the unread sessionStartedAt prop/state chain.
1 parent 929d2f4 commit bb86e83

5 files changed

Lines changed: 0 additions & 65 deletions

File tree

‎src/tui/app.tsx‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ export type AppProps = {
178178
// Emits "scrollUp"/"scrollDown" for mouse-wheel events, which are stripped
179179
// from stdin before they reach useInput (see createFilteredStdin).
180180
mouseEvents?: EventEmitter;
181-
// Wall-clock ms timestamp the session started. Drives the whole-session timer
182-
// in the status bar; reset on /new.
183-
sessionStartedAt?: number;
184181
// Inspectable child sessions for the Agents strip and enter-session UI.
185182
subAgentSessions?: SubAgentSessionStore;
186183
/** Goal mode operator surface. */
@@ -266,7 +263,6 @@ export function App({
266263
globallyOnboarded = false,
267264
globalOnboardingPath,
268265
mouseEvents,
269-
sessionStartedAt: sessionStartedAtProp,
270266
subAgentSessions,
271267
goalApi,
272268
telemetryNotice,
@@ -651,8 +647,6 @@ export function App({
651647
const copyTargetList = copyModeOpen ? copyTargetsRef.current : [];
652648

653649
const [, forceRender] = useState(0);
654-
// Whole-session timer for the status bar. Held in state so /new can zero it.
655-
const [sessionStartedAt, setSessionStartedAt] = useState(sessionStartedAtProp ?? Date.now());
656650

657651
const {
658652
sendMessage,
@@ -693,7 +687,6 @@ export function App({
693687
promptXaiRelogin,
694688
setExpandedTools,
695689
setInputValue,
696-
setSessionStartedAt,
697690
setEnteredSessionId,
698691
setAgentsNavOpen,
699692
setAgentsNavIndex,

‎src/tui/hooks/use-message-pipeline.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export type UseMessagePipelineArgs = {
4444
promptXaiRelogin: (name: string) => void;
4545
setExpandedTools: Dispatch<SetStateAction<ReadonlySet<string>>>;
4646
setInputValue: Dispatch<SetStateAction<string>>;
47-
setSessionStartedAt: Dispatch<SetStateAction<number>>;
4847
setEnteredSessionId: Dispatch<SetStateAction<string | null>>;
4948
setAgentsNavOpen: Dispatch<SetStateAction<boolean>>;
5049
setAgentsNavIndex: Dispatch<SetStateAction<number>>;
@@ -98,7 +97,6 @@ export function useMessagePipeline({
9897
promptXaiRelogin,
9998
setExpandedTools,
10099
setInputValue,
101-
setSessionStartedAt,
102100
setEnteredSessionId,
103101
setAgentsNavOpen,
104102
setAgentsNavIndex,
@@ -226,7 +224,6 @@ export function useMessagePipeline({
226224
lastSentMessageRef.current = "";
227225
quotaAutoRetryFiredRef.current = true;
228226
setInputValue("");
229-
setSessionStartedAt(Date.now());
230227
setEnteredSessionId(null);
231228
setAgentsNavOpen(false);
232229
setAgentsNavIndex(0);

‎src/tui/hooks/use-session-clock.ts‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎src/tui/runner.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,6 @@ export async function runTUI(initialConfig: Config): Promise<number> {
14661466
activePlugins={activePlugins}
14671467
initialWorkflowStatus={workflowController.status()}
14681468
mouseEvents={mouseEvents}
1469-
sessionStartedAt={startedAt}
14701469
subAgentSessions={subAgentSessions}
14711470
goalApi={{
14721471
get: () => goalGovernor.get(),

‎tests/unit/tui/use-session-clock.test.tsx‎

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)