Repository navigation
Description
Problem
Two manual debug bundles show the same user-facing failure: after submitting a prompt, the prompt appears to be missing from the feed. The logs show the data is not actually lost. The optimistic user row is created and included in the render row model, but it is not at the bottom/latest end of the feed. Semantic-history rows and the transient work row (submitting / thinking / requesting / responding) come after it, so the visible latest area can make it look like the submitted user prompt never rendered.
This is distinct from prompt-submit failures. The submit path fired, optimistic_user_add fired, and the row exists. The problem is render ordering / latest-scroll ownership.
Evidence
Manual bundle 1:
- bundle:
~/.config/agent-code/debug-bundles/2026-05-19T08-50-44-275-21e655e8 - note:
did not show the user prompt? (real issue not claude thing) feed-debug.jsonlat2026-05-19T08:50:38.339Z:submit started with baselineoptimistic_user_add- uuid:
optimistic-codex-user:1779180638339 - text begins with:
Well, we can create a new issue...
- immediate render at
2026-05-19T08:50:38.347Z:visible_rowschanges96 -> 98 (+2 -0)- the optimistic user row is present in the full row list
- the last rows are semantic history rows plus
work:submitting:none
- subsequent renders keep the optimistic user row in the model, but the tail remains semantic/work rows (
thinking,requesting,responding).
Manual bundle 2:
- bundle:
~/.config/agent-code/debug-bundles/2026-05-19T09-03-10-738-21e655e8 - note:
same issue, no user propmt rendering? feed-debug.jsonlat2026-05-19T09:03:06.878Z:optimistic_user_add- uuid:
optimistic-codex-user:1779181386878 - text begins with:
That's great. So please now break down to me all the issues...
- immediate render at
2026-05-19T09:03:06.886Z:visible_rowschanges112 -> 114 (+2 -0)- the optimistic user row is present in the full row list
- the last rows are semantic history rows plus
work:submitting:none
- captured
state-snapshot.jsonand HTML contain the prompt text, confirming this is not a storage/transcript loss.
Likely cause
The feed row builder allows semantic-history/current-work rows to sit after transcript/optimistic user rows. When submit happens, the newly-added user row is not treated as the latest visual anchor. The latest/bottom area is then owned by provider semantic/work rows, so the UI looks like it skipped the user prompt.
Desired behavior
When a user submits a prompt:
- the optimistic user row should be visible as the latest user-authored event immediately after submit
- the feed should scroll/anchor to the submitted prompt or otherwise keep it in view before transient work rows take over
- semantic history/work rows must not bury a freshly submitted user row in a way that makes the prompt appear absent
Acceptance criteria
- Add a regression test or debug-render fixture where
optimistic_user_addis followed by semantic/work rows, and assert the submitted prompt remains visible/anchored as the latest user action. - Fix row ordering and/or scroll anchoring so a freshly submitted prompt cannot be hidden behind semantic history/work rows.
- Preserve the distinction between actual missing prompt data and prompt-present-but-buried rendering; debug logs should make that distinction easy to verify.
Related
- Add comprehensive rendering regression tests for feed ownership and streaming behavior #183 rendering regression tests for feed ownership and streaming behavior
- Improve queued message rendering for long prompts and multi-line content #185 queued message rendering for long prompts and multi-line content
Activity
Juliusolsson05 commentedon May 19, 2026
Verified against the captured HTML, not only
feed-debug.jsonlrow arrays.The user prompt rows are present in both
html-clean.htmlandhtml-raw.html, but they are positioned earlier in DOM/text order, above later assistant/tool output. This matches the user report: while scrolling through the visible chat history, the user prompts can effectively disappear because they are not at the latest/bottom position where submitted prompts are expected.Bundle
2026-05-19T08-50-44-275-21e655e8:html-clean.htmlcontainsdata-entry-uuid="optimistic-codex-user:1779180638339"Well, we can create a new issue...starts at HTML offset391914008There are currently 28 open GitHub issues...appears much later around char12814Bundle
2026-05-19T09-03-10-738-21e655e8:html-clean.htmlcontainsdata-entry-uuid="optimistic-codex-user:1779181386878"That's great. So please now break down...starts at HTML offset231392735There are currently 28 open GitHub issues...around char7458andCreated the issue...around char10228So the sharper bug statement is: submitted user prompts are present in the DOM, but they are ordered/anchored above subsequent assistant/tool rows instead of remaining visually adjacent to the turn they triggered or anchored as the latest user action. The acceptance criteria should verify DOM/order/scroll placement, not just row existence.
Juliusolsson05 commentedon May 19, 2026
Review-agent follow-up
Four read-only review agents checked the rendering diagnoses. For this issue, both Claude/Codex agreed the visible symptom is correctly identified: the submitted prompt is not lost; it is present/rendered but can be visually buried.
Sharper diagnosis:
addOptimisticCodexUserEntry()appends the submitted Codex prompt as a normal entry-planeuserrow.shouldQueueOptimisticCodexUserEntry()only queues whensemantic.currentTurnis actively running.semantic.history, so the optimistic user row can land above prior-turn semantic history that is still visible while JSONL catches up.Important caveats from review:
Useful code references from review:
src/renderer/src/features/feed/ui/Feed.tsxrenders entries before semantic history/current/work.src/renderer/src/features/feed/model/renderModel.tsbuilds debug rows in the same order.src/renderer/src/workspace/hook/actions/streaming.tscreates optimistic Codex user entries and gates queueing viashouldQueueOptimisticCodexUserEntry().docs/codex-rewrite-render/submit-queue-debug.mdalready hints that Codex optimistic submit should be modeled as its own surface, not as an indistinguishable committed entry.Operational note: the cited debug bundles were rotated/pruned during investigation, so a future fix should capture a fresh repro fixture rather than relying on those bundle paths.
fix(rendering): address 4-agent review of #492 — block-grain suppress…
fix(replay): address 4-agent review of the #493 stack — require the p…