chore(desktop): #1645 follow-ups + isolate flaky server-dashboard test#1651
Merged
Conversation
added 2 commits
May 23, 2026 21:26
Three small cleanups landed alongside the desktop UX bundle: - composer: extract `recordSendAndReset` so the history-push + browse- index reset logic is one helper, not duplicated between the Enter key path and the send-button onClick. - composer: drop the duplicate IME-quirk comment at the use site; the ref declaration block at the top of the component already documents the macOS Chinese IME ordering quirk. - App: hoist the inline `onEdit` arrow into a useCallback so UserMsg's memo isn't busted by a fresh function identity on every render of the message list.
The v0.13 panels suite uses mkdtempSync for cfgPath and usagePath but the handlers it exercises (/api/health, listSessions) still call homedir() under the hood. On a dev machine with thousands of session jsonl files in ~/.reasonix/sessions the readdir + per-file statSync walk blows past the 5 s default test timeout, even though the same test runs in ms on a clean CI box. Redirect HOME and USERPROFILE inside the suite's beforeEach so the walks land in the suite's already-empty temp dir, and restore the originals in afterEach. No production-code change — the handlers' homedir() coupling is a separate cleanup. Whole file now runs in 1.7 s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two unrelated chores, bundled because hitting the second was the only way to get the first past the local pre-push gate.
test(server-dashboard)— root-cause a flaky test (separate commit)The `dashboard server: v0.13 panels` suite uses `mkdtempSync` for `cfgPath` + `usagePath` but the handlers it exercises (`/api/health`, `listSessions`) still call `homedir()` underneath. On a dev machine with ~20k session jsonl files in `~/.reasonix/sessions` the readdir + per-file `statSync` walk blows past the 5 s default test timeout, even though the same test finishes in milliseconds on a clean CI box.
Redirect `HOME` + `USERPROFILE` inside the suite's `beforeEach` so the walks land in the already-empty temp dir, restore in `afterEach`. No production-code change — the handlers' `homedir()` coupling is a separate cleanup that deserves its own PR.
Whole file now runs in 1.7 s (78 tests).
chore(desktop)— tidy three small things from #1645 (separate commit)How to verify
Checklist