Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Composer and git panel state races: stale suggestions, cleared input, commit message in the wrong project

Open
#194 0 comments 0 reactions 0 assignees View on GitHub

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

bug priority: low severity: low

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) writes message.value after its await without checking whether the project changed or the user typed meanwhile.
  • Git status race: App.refreshGit (app.ts:691-697) and GitPanel.refresh (panels.ts:384-398) use separate generation counters but both update the status bar. A slow older git:status can 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 failed files:list caches [] for the whole session.
  • Cleared input: submit() (composer.ts:223-236) clears the input after send resolves, deleting anything typed during the round trip.
  • Old diff colors: settings:changed doesn'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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.