Composer and git panel state races: stale suggestions, cleared input, commit message in the wrong project
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 57/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- desktop
Research direction
Start with the cited entry points: src/renderer/src/views/panels.ts around generate() and GitPanel.refresh, composer.ts around submit() and the file-list cache, and app.ts around refreshGit and settings:changed. Trace the async updates and cache invalidation, then run the relevant project checks. Done means all five reported races or stale states are addressed without overwriting newer user input.
Written by the indexing model from the issue text.
Description
Found in the 2026-10-07 code review (read; the git status race is not reproduced).
Problems
- Commit message in the wrong project:
generate()(src/renderer/src/views/panels.ts:596-608) writesmessage.valueafter its await without checking whether the project changed or the user typed meanwhile. - Git status race:
App.refreshGit(app.ts:691-697) andGitPanel.refresh(panels.ts:384-398) use separate generation counters but both update the status bar. A slow oldergit:statuscan overwrite a newer one, for example a dirty*appearing after a commit. - Stale @-mention list: the file list (
composer.ts:245) is cached until the project changes, so files the agent creates are never suggested. A failedfiles:listcaches[]for the whole session. - Cleared input:
submit()(composer.ts:223-236) clears the input aftersendresolves, deleting anything typed during the round trip. - Old diff colors:
settings:changeddoesn't re-render the transcript (app.ts:175-181), so diffs already shown keep the old theme's colors.
Fix
- Use a generation token in
generate()and don't overwrite text the user typed. - Route both git refreshes through one generation counter.
- Invalidate the mention cache on
tool-end/filesChanged, and don't cache failures. - Clear the input only if it still equals the sent text.
- Re-render the transcript when the theme changes.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 2
- Avg merge
- 5h 52m
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PierrunoYT/patch
-
enhancement priority: low security severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
PierrunoYT/patch#208 ·
Maintainers usually reply within 1 day
-
enhancement platform: windows priority: low severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PierrunoYT/patch#198 ·
Maintainers usually reply within 1 day
-
bug priority: low severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PierrunoYT/patch#190 ·
Maintainers usually reply within 1 day
-
Unbounded waits: revokeProjectGrant has no timeout, and timed-out browser waiters are never removedOpenbug priority: low severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PierrunoYT/patch#188 ·
Maintainers usually reply within 1 day
-
bug priority: medium severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
PierrunoYT/patch#179 ·
Maintainers usually reply within 1 day
All issues in PierrunoYT/patch
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
farbenmeer/tapi#531 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
naver/egjs-flicking#971 ·
-
Renderer treats a sub-pixel width difference as a resize, which cancels the `motion()` entranceOpen
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Tenant
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
MTES-MCT/Dossier-Facile-Frontend#2061 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
backnotprop/plannotator#1784 ·
Maintainers usually reply within 1 day