Improve dataframe column selection UX#279
Open
revmischa wants to merge 5 commits intomeridianlabs-ai:mainfrom
Open
Improve dataframe column selection UX#279revmischa wants to merge 5 commits intomeridianlabs-ai:mainfrom
revmischa wants to merge 5 commits intomeridianlabs-ai:mainfrom
Conversation
Fix scan_tokens_total naming mismatch in column picker, add saveable column presets persisted to localStorage, sync column selection to URL via `cols` query param for shareable links, and add a Copy Link toolbar button. Also fix handleTabChange clobbering other URL params, and extract shared useOperationStatus hook. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6a2b786 to
ad55030
Compare
Add eslint-disable for intentional mount-only useEffect in useColumnsUrlSync hook, apply prettier formatting, and rebuild dist output to match rebased source. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use localStorage instead of NoPersistence for server deployments so column presets survive page refresh - Fix race condition where URL cols param was stripped on mount before the store could re-render with URL-sourced columns - Use replace:true for tab changes to avoid polluting browser history Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Presets saved within the 2s debounce window were lost on page refresh because the pending localStorage write hadn't fired yet. Add a flush() method to the debounce utility and call it on beforeunload to ensure all state is persisted before the page navigates away. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The 2000ms window was too long—saving a preset and refreshing within that window lost data. Combined with the beforeunload flush from the previous commit, this makes persistence robust even on tab crash or mobile (where beforeunload may not fire). The serialized state is ~3 KB so 500ms has negligible perf impact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
scan_tokens_total→scan_total_tokensnaming mismatch in the column picker that prevented toggling that columncolsquery parameter, so URLs can be shared with specific column configurationshandleTabChangenow preserves existing URL params instead of clobbering themuseOperationStatushook from duplicated code in CSV buttonsFiles Changed
ScannerDataframeColumnsPopover.tsxScannerDataframeColumnsPopover.module.cssurl.tscolsquery param helpersstore.tsColumnPresettype, preset state/actionScannerDataframeCopyLinkButton.tsxuseOperationStatus.tsScannerDataframeCSVButtons.tsxScanPanelBody.tsxTest plan
scan_total_tokensappears (notscan_tokens_total), toggle it on/offcolsparam → copy URL → open in new tab → verify same columns appliedcolsparam preserved in URLpnpm check,pnpm build,pnpm testall pass🤖 Generated with Claude Code