Description
Bug Report
Description
The /timestamps slash command (and its alias /toggle-timestamps) is supposed to show a timestamp below each user message in the TUI session view. While the command correctly toggles between "Show timestamps" and "Hide timestamps" state (persisted via KV store), the timestamps are not visually rendered in any theme.
Steps to Reproduce
- Start OpenCode TUI (v1.14.42+)
- Have a conversation with at least one user message
- Type
/timestamps in the prompt — the command title reads "Show timestamps"
- Select it to toggle timestamps ON
- Observe: no timestamp appears under any user message bubble
- Run
/timestamps again — title now reads "Hide timestamps", confirming the toggle state changed
Expected Behavior
When timestamps are enabled, each user message bubble should display a creation time (e.g. 14:32 or 14:32 · 2026-05-10) at the bottom, rendered in theme.textMuted.
Actual Behavior
No visible timestamp text appears under user messages in any theme (tested with multiple built-in themes via /themes).
Environment
Root Cause Analysis
The rendering code at packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1361-1376:
<Show
when={queued()}
fallback={
<Show when={ctx.showTimestamps()}>
<text fg={theme.textMuted}>
<span style={{ fg: theme.textMuted }}>
{Locale.todayTimeOrDateTime(props.message.time.created)}
</span>
</text>
</Show>
}
>
The toggle logic itself is correct:
- KV signal defaults to
"hide" (line 218)
- Toggle switches between
"hide" / "show" (line 681)
showTimestamps memo derives boolean state (line 233)
The likely issue is a layout/rendering problem: the timestamp <text> element is the last child inside a <box> with paddingBottom={1} (line 1336). In OpenTUI's flex layout, this trailing <text> without an explicit wrapping <box> may collapse into the bottom padding area, rendering it invisible. The <text> element may need to be wrapped in its own <box> or the padding structure needs adjustment.
Related: /exit command also affected by the same commit
The same commit (98f5e6e71) also introduced an enabled guard on the /exit slash command (app.tsx:651-655) that makes it unreachable in the autocomplete dropdown whenever the prompt input has text:
enabled: () => {
const current = promptRef.current
if (!current?.focused) return true
return current.current.input === ""
},
Since typing / to open the autocomplete means the prompt is focused and contains text, the enabled check returns false and /exit is filtered out of the slash command list. This appears to be an unintended side effect — the guard was likely intended to prevent accidental exits during typing, but it also prevents the slash command from appearing in autocomplete.
Plugins
No response
OpenCode version
1.14.42+
Steps to reproduce
- Start OpenCode TUI (v1.14.42+)
- Have a conversation with at least one user message
- Type
/timestamps in the prompt — the command title reads "Show timestamps"
- Select it to toggle timestamps ON
- Observe: no timestamp appears under any user message bubble
- Run
/timestamps again — title now reads "Hide timestamps", confirming the toggle state changed
Screenshot and/or share link
No response
Operating System
Ubuntu 24.04
Terminal
ssh to Ubuntu at Windows Terminal
Description
Bug Report
Description
The
/timestampsslash command (and its alias/toggle-timestamps) is supposed to show a timestamp below each user message in the TUI session view. While the command correctly toggles between "Show timestamps" and "Hide timestamps" state (persisted via KV store), the timestamps are not visually rendered in any theme.Steps to Reproduce
/timestampsin the prompt — the command title reads "Show timestamps"/timestampsagain — title now reads "Hide timestamps", confirming the toggle state changedExpected Behavior
When timestamps are enabled, each user message bubble should display a creation time (e.g.
14:32or14:32 · 2026-05-10) at the bottom, rendered intheme.textMuted.Actual Behavior
No visible timestamp text appears under user messages in any theme (tested with multiple built-in themes via
/themes).Environment
98f5e6e71— "introduce opentui keymap as sole key/cmd engine (introduce opentui keymap as sole key/cmd engine #26053)"Root Cause Analysis
The rendering code at
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1361-1376:The toggle logic itself is correct:
"hide"(line 218)"hide"/"show"(line 681)showTimestampsmemo derives boolean state (line 233)The likely issue is a layout/rendering problem: the timestamp
<text>element is the last child inside a<box>withpaddingBottom={1}(line 1336). In OpenTUI's flex layout, this trailing<text>without an explicit wrapping<box>may collapse into the bottom padding area, rendering it invisible. The<text>element may need to be wrapped in its own<box>or the padding structure needs adjustment.Related:
/exitcommand also affected by the same commitThe same commit (
98f5e6e71) also introduced anenabledguard on the/exitslash command (app.tsx:651-655) that makes it unreachable in the autocomplete dropdown whenever the prompt input has text:Since typing
/to open the autocomplete means the prompt is focused and contains text, theenabledcheck returnsfalseand/exitis filtered out of the slash command list. This appears to be an unintended side effect — the guard was likely intended to prevent accidental exits during typing, but it also prevents the slash command from appearing in autocomplete.Plugins
No response
OpenCode version
1.14.42+
Steps to reproduce
/timestampsin the prompt — the command title reads "Show timestamps"/timestampsagain — title now reads "Hide timestamps", confirming the toggle state changedScreenshot and/or share link
No response
Operating System
Ubuntu 24.04
Terminal
ssh to Ubuntu at Windows Terminal