Skip to content

Commit 1268103

Browse files
committed
docs(forklog): record per-entry transcript timestamps
Add the feature and session records for `timestamps` in tui.json (9163ac0, upstream PR anomalyco#53654 on issue anomalyco#42498), link the turn-timing feature timeline to it, and index both in the forklog README. AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Tool: opencode 1.18.34-vt-126-907b3bc518 AI-Platform: linux AI-Harness: Vibeterm 30e51ce AI-Session-ID: ses_eec3e5569ffe2otGPxp4LBssZb
1 parent 1ada8e5 commit 1268103

4 files changed

Lines changed: 235 additions & 0 deletions

File tree

‎.vibeterm/forklog/README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,17 @@ carries every feature forward unchanged. That commit includes the full
6464
- [Compact sidebar MCP rows without status text](./features/2026-10-04-sidebar-mcp-list.md)
6565
- [Navigate the transcript by prompt, landmark and block](./features/2026-10-05-tui-block-nav.md)
6666
- [Return to the scrolled-up position on messages_first](./features/2026-10-06-tui-home-return.md)
67+
- [Choose which transcript entries show timestamps](./features/2026-10-06-tui-part-timestamps.md)
6768
- [Show the provider and model id in message footers](./features/2026-10-06-tui-model-label.md)
6869

6970
## Session records
7071

72+
- [2026-10-06 `ses_eec3e5569ffe2otGPxp4LBssZb`](./sessions/2026-10-06-tui-part-timestamps.md)
73+
- Add `timestamps` (`all`, `none`, a list of `user`, `assistant`, `text`,
74+
`reasoning`, `tool`, `error`, `compaction`) so tool calls and other
75+
entries show when they finished; PR #53654 on #42498; build and install
76+
on both hosts, `all` set in their `tui.json`.
77+
7178
- [2026-10-06 `ses_eec44cf7effeFCqQefM0NkWLaW`](./sessions/2026-10-06-tui-model-label.md)
7279
- Add `model_label` (`name`/`id`) so message footers and the prompt show
7380
`providerID/modelID`; upstream issue #53638 and PR #53639; build and

‎.vibeterm/forklog/features/2026-10-04-tui-turn-timing.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ quoting the user:
8585

8686
## Timeline
8787

88+
- 2026-10-06
89+
[`ses_eec3e5569ffe2otGPxp4LBssZb`](../sessions/2026-10-06-tui-part-timestamps.md) -
90+
a set `timestamps` key in `tui.json` now overrides `turn_timing.time` and
91+
makes `/turn-times` last until exit; unset keeps this feature unchanged.
92+
See [per-entry timestamps](./2026-10-06-tui-part-timestamps.md).
93+
8894
- 2026-10-06 [`ses_eeda1d251ffel81U5Y42j4kb33`](../sessions/fork-audit.md) -
8995
verify date-first locale regression and real intermediate/final footers;
9096
elapsed-time meaning and full-route test gaps are in the linked inventory.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Choose which transcript entries show timestamps
2+
3+
## Identity
4+
5+
- Status: active
6+
- Integration branch: `dev-nowaker`
7+
- Development branch(es): `tui-part-timestamps` (on `tui-turn-timing` `b14b75e5d8`, itself on upstream `dev` `907b3bc518`; also the upstream PR head)
8+
- First local commit: `9163ac0f36`
9+
- Current local commit(s): `9163ac0f36`
10+
- Upstream base when introduced: `907b3bc518` (upstream `dev`)
11+
- Last checked against upstream: `907b3bc518` (upstream `dev`)
12+
- Upstream: issue [#42498](https://github.com/anomalyco/opencode/issues/42498) (design [comment](https://github.com/anomalyco/opencode/issues/42498#issuecomment-6028995049)), PR [#53654](https://github.com/anomalyco/opencode/pull/53654), stacked on PR [#53195](https://github.com/anomalyco/opencode/pull/53195)
13+
14+
## Original request
15+
16+
Relayed by coordinator `ses_ef8235798ffejGr4sa22eXmVNv` (effort item 18),
17+
quoting the user:
18+
19+
> i noticed tool calls are missing datetimes; since that is different from ai
20+
> responses, it should have a separate switch to whether include them or not.
21+
> default: no, here: yes. include all time stamps etc. on tool calls, and if
22+
> other message types aren't getting their dates, they should get them also,
23+
> for consistency. maybe a single knob with a list of message types that get
24+
> them or not, with a sane default that matches today's opencode, also 'all',
25+
> or a comma delimited list of message types that get them. config docs to
26+
> explain all available values. (does tui.conf come with comments in jsonc? if
27+
> so, include options there)
28+
29+
## Goals
30+
31+
- One `tui.json` key, `timestamps`, naming the transcript entries that show
32+
a timestamp: `"all"`, `"none"`, a comma-separated list, or an array of
33+
`user`, `assistant`, `text`, `reasoning`, `tool`, `error`, `compaction`.
34+
- Tool calls show when they finished and how long they ran
35+
(`✱ Glob "*" (1 match) · 8:05 PM · 500ms`; block tools in their title or a
36+
trailing line).
37+
- Every format uses `Locale.todayTimeOrDateFirst` from the turn-timing
38+
feature.
39+
- Unset reproduces vanilla rendering exactly.
40+
41+
## Non-goals
42+
43+
- No live "running since" clock on a running tool (upstream #50891).
44+
- `turn_timing.duration` and `/turn-durations` unchanged.
45+
- No new slash command; `/timestamps` and `/turn-times` keep their names.
46+
47+
## Rationale and constraints
48+
49+
- Vanilla inventory (`907b3bc518` + turn timing): only user prompts
50+
(`/timestamps`, kv `timestamps`) and assistant footers (`turn_timing.time`,
51+
`/turn-times`) show a time. Reasoning headers show a duration only; tool
52+
rows, text blocks, the assistant error box and the compaction divider show
53+
nothing. Tool and reasoning parts already carry `time.start`/`time.end`;
54+
text parts carry an optional `time.end`.
55+
- Coexist rather than absorb: unset keeps `/timestamps`, `/turn-times` and
56+
`turn_timing.time` persisting in kv exactly as before. Set, the list
57+
decides every type on each start and overrides `turn_timing.time`; the two
58+
toggles still flip prompt and turn times but only for the running TUI.
59+
- kv-wins was rejected: `kv.json` usually already contains `"timestamps"`
60+
because the kv store persists its in-memory `kv.signal` defaults with any
61+
other write, so the config option would be dead on most installs.
62+
- opencode ships no commented `tui.jsonc` template; the JSON schema
63+
`description` (generated by `packages/opencode/script/schema.ts` into
64+
`opencode.ai/tui.json`) is the in-editor documentation and lists every
65+
value.
66+
67+
## Changes
68+
69+
| Commit | Workday | Change | Stable seam |
70+
|---|---|---|---|
71+
| `9163ac0f36` | 2026-10-06 | `timestamps` schema and `timestampTypes`; per-type timestamps on tool rows/blocks, reasoning header, text blocks, error box, compaction divider; `/timestamps` and `/turn-times` session-only when set; docs and tests | `Timestamps`, `timestampTypes` in `packages/tui/src/config/index.tsx`; `showPartTimestamp`, `formatToolTimestamp`, `InlineToolRow` `timestamp` prop in `packages/tui/src/routes/session/index.tsx` |
72+
73+
## Verification
74+
75+
- `bun typecheck` in `packages/tui` and `packages/opencode` - exit 0 on
76+
`tui-part-timestamps` and on `part-timestamps-land`, with the repo's
77+
`@types/node` 24.12.2 (see the session record for the ambient 25.9.2).
78+
- `packages/tui` tests `config.test.tsx`, `inline-tool-wrap-snapshot.test.tsx`,
79+
`util/locale.test.ts`: 31 pass. `packages/opencode/test/config/tui.test.ts`:
80+
31 pass, 4 fail; the 4 plugin-merge failures are identical on the base.
81+
- Manual surface: isolated TUI (throwaway tmux sockets `oc-part-ts-*`,
82+
scratch `XDG_*`, `OPENCODE_TOOLS_DATA_DIR`/`OPENCODE_PLUGINS_DATA_DIR`),
83+
fake OpenAI-compatible provider streaming reasoning, text, parallel glob +
84+
bash calls, a slow bash call, a final answer, a forced 400, then
85+
`/compact`. Before (`tui-turn-timing`) and after with `timestamps` unset:
86+
identical at every stage after normalizing durations. `"all"` with a stale
87+
`{"timestamps":"hide"}` in kv: every type stamped. `"user, tool"`: prompt
88+
times and tool rows only; `/timestamps` hid prompt times for the run and
89+
`kv.json` stayed absent.
90+
91+
## Timeline
92+
93+
- 2026-10-06
94+
[`ses_eec3e5569ffe2otGPxp4LBssZb`](../sessions/2026-10-06-tui-part-timestamps.md)
95+
- `9163ac0f36`: introduce (cherry-pick of `da278a9c97`, conflicts with
96+
`sidebar`/`usage`/`model_label` schema and `keep_scroll_on_submit`
97+
resolved by keeping both); design comment on #42498, PR #53654.
98+
- Build and install: desktop and m4max `1.18.34-vt-130-907b3bc518`;
99+
`"timestamps": "all"` in both hosts' `tui.json`.
100+
101+
## Current maintenance notes
102+
103+
- Drop the commit once PR #53654 (or an equivalent) is in upstream `dev`;
104+
it depends on the turn-timing commits.
105+
- Adjacent to `model_label` in `Info` and to `keep_scroll_on_submit` in the
106+
session route; upstream bumps touching either may conflict textually.
107+
108+
### Upstream integration checklist
109+
110+
- Locate `Timestamps` and `timestampTypes` in
111+
`packages/tui/src/config/index.tsx`.
112+
- Locate `showPartTimestamp`, `formatToolTimestamp` and the `timestamp`
113+
prop of `InlineToolRow` in `packages/tui/src/routes/session/index.tsx`.
114+
- Run `bun typecheck` in `packages/tui` and the three `packages/tui` tests
115+
above.
116+
- With `"timestamps": "all"`, run a multi-step prompt and check tool rows,
117+
bash blocks, thinking headers and the footer.
118+
- Link a new timeline row to the current session record.
119+
120+
## Supersession or removal
121+
122+
- Not applicable; status is active.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Choose which transcript entries show timestamps
2+
3+
## Identity
4+
5+
- Workday: 2026-10-06
6+
- Session: `ses_eec3e5569ffe2otGPxp4LBssZb`
7+
- Agent/platform: `Sisyphus` on `anthropic/claude-opus-5-5` (variant high) / linux, Vibeterm
8+
- Repository: `~/projekty/webapps/opencode`
9+
- Integration branch: `dev-nowaker`
10+
- Development branch(es): `tui-part-timestamps` (`da278a9c97`, on `tui-turn-timing` `b14b75e5d8`); landing branch `part-timestamps-land`
11+
- Upstream base: `907b3bc518` (upstream `dev`, contains `v1.18.34`); unchanged
12+
- Source result commit(s): `9163ac0f36` (cherry-pick of `da278a9c97`)
13+
- Forklog commit: this file's introducing commit
14+
15+
## User requests
16+
17+
Relayed by coordinator `ses_ef8235798ffejGr4sa22eXmVNv` (item 18 of its
18+
"opencode TUI improvements" effort), quoting the user:
19+
20+
> i noticed tool calls are missing datetimes; since that is different from ai
21+
> responses, it should have a separate switch to whether include them or not.
22+
> default: no, here: yes. include all time stamps etc. on tool calls, and if
23+
> other message types aren't getting their dates, they should get them also,
24+
> for consistency. maybe a single knob with a list of message types that get
25+
> them or not, with a sane default that matches today's opencode, also 'all',
26+
> or a comma delimited list of message types that get them. config docs to
27+
> explain all available values. (does tui.conf come with comments in jsonc? if
28+
> so, include options there)
29+
30+
## Goals
31+
32+
- One setting listing which entry types get timestamps; default identical to
33+
today's rendering; `all` on both hosts.
34+
35+
## Constraints and non-goals
36+
37+
- Existing `/timestamps`, `/turn-times`, `turn_timing` configs and kv values
38+
keep working.
39+
- No TUI tab, serve unit or vibeterm tmux server restarted.
40+
41+
## Branch and upstream movement
42+
43+
| Repository | Branch | Before | After | Action |
44+
|---|---|---|---|---|
45+
| `opencode` (GitHub fork + GitLab) | `tui-part-timestamps` | - | `da278a9c97` | new branch on `tui-turn-timing`; head of PR #53654 |
46+
| `opencode` | `dev-nowaker` | `c602afcb13` | `9163ac0f36` + this forklog commit | cherry-pick (schema and session-route conflicts resolved by keeping both sides), fast-forward; pushed to `origin` and `nowaker-github` |
47+
48+
## Features touched
49+
50+
| Feature | Outcome | Evidence |
51+
|---|---|---|
52+
| [Choose which transcript entries show timestamps](../features/2026-10-06-tui-part-timestamps.md) | introduced | tests, typecheck, before/after tmux frames |
53+
| [Per-turn completion time and duration in the TUI](../features/2026-10-04-tui-turn-timing.md) | extended: `timestamps` overrides `turn_timing.time` when set | `after-all` frame with a stale kv; unset frames identical |
54+
55+
## Other delivered work
56+
57+
- Upstream: design comment on the existing request
58+
[#42498](https://github.com/anomalyco/opencode/issues/42498#issuecomment-6028995049)
59+
instead of a duplicate issue; PR
60+
[#53654](https://github.com/anomalyco/opencode/pull/53654), stating it
61+
builds on #53195.
62+
- Host config: `"timestamps": "all"` added to `~/.config/opencode/tui.json`
63+
on desktop and m4max by a jsonc-parser `modify` plus temp-file rename;
64+
`diff` against a copy shows only that key added, and both files parse.
65+
66+
## Verification
67+
68+
- `bun typecheck` in `packages/tui` and `packages/opencode` - exit 0.
69+
- Tests: see the feature record (31 pass in `packages/tui`; 4 known
70+
plugin-merge failures in `packages/opencode/test/config/tui.test.ts`).
71+
- Pre-push hook (`bun turbo typecheck`) 30/30 on every push.
72+
73+
## Build and install
74+
75+
- desktop: `.vibeterm/build.sh` from the primary checkout at `9163ac0f36`
76+
(with the uncommitted retry-header cap); installed
77+
`1.18.34-vt-130-907b3bc518`, inode `49963233`. The binary contains the
78+
`timestamps` schema description and `OPENCODE_RETRY_MAX_HEADER_DELAY_MS`.
79+
`opencode-serve-tailscale` (PID 1507297) and `opencode-serve-lan` (PID
80+
1509289) kept their PIDs and start times.
81+
- m4max: checkout fast-forwarded to `9163ac0f36`; `.vibeterm/build.sh`
82+
installed `1.18.34-vt-130-907b3bc518` at
83+
`/Volumes/projects/webapps/opencode-build/bin/opencode` (inode `21723457`)
84+
with the same two markers.
85+
- Running TUIs pick the feature up on their next restart.
86+
87+
## Commit provenance
88+
89+
- `9163ac0f36` - TUI change, docs, tests.
90+
- Required trailer: `AI-Session-ID: ses_eec3e5569ffe2otGPxp4LBssZb`
91+
92+
## Unknowns and blocked verification
93+
94+
- On desktop, `packages/opencode` typecheck resolved `@types/node` 25.9.2
95+
from the ambient `~/node_modules` (no hoisted `node_modules/@types/node`
96+
in the checkout), failing `src/bus/global.ts` TS2416 on any branch off
97+
upstream `dev`. A symlink `node_modules/@types/node` ->
98+
`.bun/@[email protected]/...` in the worktrees and the primary checkout
99+
(ignored, local only) restored the pinned version; the hook then passed
100+
30/30.

0 commit comments

Comments
 (0)