[dashboards] Fix source filter firing navigation on every keystroke#131
Conversation
Code reviewFound 1 issue:
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Fixes stale input state on browser back/forward or external URL changes, as caught by @shansen3.
|
Good catch, thanks. Fixed in 253560e. Added a |
|
@claude review this PR |
1 similar comment
|
@claude review this PR |
|
Claude finished @matthallett1's task in 46s —— View job Code Review
The fix is correct and well-scoped. Here's my assessment: What changed (
The implementation is sound. A few minor observations:
Checklist:
Verdict: LGTM. The two minor items above are worth noting but neither blocks merging. The core fix is correct, the state desync from the previous review has been addressed, and the UX is meaningfully improved. |
matthallett1
left a comment
There was a problem hiding this comment.
Clean bugfix — local state + blur/Enter commit is the standard React pattern. State desync addressed in 253560e. Reviewed with gstack /review and automated review, no issues.
…ateBJones-Projects#131) * [dashboards] Fix source filter firing navigation on every keystroke * Sync sourceInput when currentSource changes externally Fixes stale input state on browser back/forward or external URL changes, as caught by @shansen3.
…ateBJones-Projects#131) * [dashboards] Fix source filter firing navigation on every keystroke * Sync sourceInput when currentSource changes externally Fixes stale input state on browser back/forward or external URL changes, as caught by @shansen3.
Contribution Type
/dashboards)What does this do?
The Source text input in ThoughtsFilter calls
router.push()on everyonChangeevent, triggering a full server-side navigation for each character typed. Typing "chatgpt_import" fires 16 navigations in rapid succession.Fix: use local state for the input value, apply the filter on blur or Enter. The select-based filters (Type, Importance) are unaffected since they commit on selection, not per-keystroke.
Requirements
Nothing new.
Checklist
README.mdwith prerequisites, step-by-step instructions, and expected outcome (n/a - see PR body)metadata.jsonhas all required fields (n/a)