Repository navigation
Give the answer the room, and let a conversation be renamed - #9
Conversation
Two things, both through the SDK's own extension points rather than beside them: the agent's working is replaced at the AgentStepsCard and ReasoningCard slots, and the conversation row was already an override. No TrueForge component is forked or reimplemented. The working had more of the screen than the result. A one-line greeting arrived underneath eight lines of expanded reasoning, and the answer - the thing a person came for - was the smallest item in view. Reasoning now collapses to one line with a preview of what is behind it, capped at a readable height when opened, and shows its newest line rather than its oldest while a turn is running so nothing looks stuck. A turn that called no tools gets a line instead of a bordered card announcing that nothing happened. Nothing is removed; only which of the two is given the room. Renaming is a local label, and that is worth stating plainly rather than letting it look like a write that went somewhere. TrueForge derives a session title from its first message and its update API accepts an agent and nothing else, so there is no title to change on the server. The name is kept in this browser, keyed on the session id read from the SDK's thread-list state - not on the title, because two conversations that opened with the same sentence are still two conversations. Three defects found while building it. Escape was saving: closing the field unmounts the input, which fires blur, which commits - so the one key whose job is to abandon an edit was completing it. The state hook threw outside its provider, which would have taken the sidebar down with one row rather than losing one button. And the storage listener was registered per subscriber, so a change made while no row was mounted was never noticed; it belongs to the module.
|
/agentic_review |
PR Summary by QodoCompact agent working and add local conversation renaming
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
Three findings, all in the rename. A write that fails must not take the rename with it. The failure was caught and then the state was re-read from the storage that had just refused it, so the name vanished from the screen too - the comment beside it claimed the opposite, and the test asserted the losing behaviour, which is how it survived. Memory is the source of truth now and storage is where it is kept for next time: a private window shows you the name you just typed, it simply will not have it tomorrow. Escape sets a flag so the blur that follows does not save. If that blur never arrived - the field lost focus some other way - the flag was still set next time and silently threw away a rename the person did want. It is cleared on the way in as well as the way out. A conversation has a local id until the harness persists it and a remote id afterwards. Keyed only on the current one, a name given early was orphaned under the old id. Every id the row is known by is read, most durable first, and a name found under a superseded one is moved. Two things found while fixing those. The id selector returned a fresh array each render, which is the identity trap that once left this app rendering a blank page; it returns one joined string. And the field did not take focus when it opened, so a rename could not be typed without reaching for the mouse.
|
All three, and the first one is the interesting failure. Failed writes discarded the rename. The write failure was caught and then the state was re-read from the storage that had just refused it, so the name vanished from the screen as well. The comment beside the catch claimed the opposite - "a rename that cannot be stored still applies to this render" - so the code, the comment and the test all disagreed with each other and only the comment was right. Memory is the source of truth now; storage is where it is kept for next time. A private window shows you the name you just typed, it simply will not have it tomorrow. Escape poisoned the next blur. Exactly right: the flag was cleared only when a blur consumed it, so an edit that closed some other way left it set and the next rename was silently thrown away. It is cleared on the way in as well. Temporary-id renames disappeared. Every id the row is known by is now read, most durable first, and a name found under a superseded id is moved to the durable one. The test asserts on the stored map rather than the rendered title, so the migration itself is what is being checked. Two more found while fixing those, both mine:
Each fix is mutation-checked: reverting it fails its test. 119 UI tests, the mount test, the root suite, lint, typecheck and build all green. |
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit e4dfbdd |
Each tab held a whole map of titles. Writing ours back erased theirs, and their storage event then erased ours: last writer wins, silently, on a change neither person made. Only the conversation actually being renamed is ours to decide, so a write merges onto what is on disk rather than onto our copy of it. That has to hold together with the failed-write fix, which needs memory to outlive storage refusing it. Refused changes are kept and re-applied on top of whatever is on disk, so a name storage would not take is not lost when the next write rebuilds the map. They are dropped once any write succeeds, because the map that succeeded already contains them - and dropped when the store is cleared, because putting them back into a store somebody emptied would be the same silent resurrection in reverse. The clearing case is what the test isolation was missing: a real localStorage.clear() emits an event with a null key, and the tests were announcing a specific key instead, so refused writes leaked from one test into the next.
|
Fixed. Each tab held a whole map, so writing ours back erased theirs and their storage event then erased ours - last writer wins, silently, on a change neither person made. Only the conversation actually being renamed is ours to decide, so a write now merges onto what is on disk rather than onto our copy of it. The interesting part is that this has to hold together with the failed-write fix from the last round, which needs memory to outlive storage refusing it. Those two pull in opposite directions: one says "trust disk", the other says "do not let disk overwrite what you have". So refused changes are kept and re-applied on top of whatever is on disk, and then dropped in the two cases where keeping them would be wrong:
That second case is also what the test isolation was missing, and it was hiding the bug. A real
|
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 426b30e |
Two gaps against the rules, both found by reading them rather than assuming. The repository claimed MIT in a heading and had no LICENSE file, so it was not actually licensed - and the rule is that judges have to be able to read the code and run it. The file is there now and the README points at it. The Qodo history stopped at #9 while nineteen pull requests had merged. Every one was reviewed, but a table ending ten merges early reads as a practice that stopped after the opening week - which is the opposite of what the trail shows, and the trail is what Best Code Quality is judged on. The five most substantial of the missing ten are written up, the rest are linked, and the section now says plainly that the defects got more serious as the code got better: the last of them was a way to forge the verdict this project exists to produce.
Two changes, both through the SDK's own extension points rather than beside them.
AgentStepsCardandReasoningCardare slot overrides; the conversation row already was one. No TrueForge component is forked or reimplemented, and the palette still comes fromtheme.tokens.The working had more of the screen than the result. A one-line greeting arrived underneath eight lines of expanded reasoning, so the answer was the smallest thing in view. Reasoning now collapses to one line carrying a preview, opens to a height-capped block, and shows its newest line while a turn is running - a preview frozen on the first sentence makes a working agent look stuck. A turn with no tool calls gets a quiet line rather than a bordered card announcing that nothing happened. Nothing is removed; only which of the two gets the room.
Renaming is a local label, and the code says so. TrueForge derives a session title from its first message, and
UpdateSessionRequestaccepts an agent and nothing else - there is no server-side title to change. So the name lives in this browser, keyed on the session id read from the SDK's thread-list state rather than on the title, because two conversations that opened with the same sentence are still two conversations. Enter saves, Escape abandons, clicking away saves, and an empty name hands the conversation back to the title TrueForge gave it.Three defects found while building it, all now covered:
useAuiStatereaches a default client whose scope accessors throw; a row rendered outside the provider would have taken the sidebar down rather than losing one button. Contained in the selector.117 UI tests, 1 mount test, and the root suite all green;
npm run lint,tsc --noEmitand the production build clean.