This repository was archived by the owner on May 13, 2026. It is now read-only.
refactor(frontend): use BROWSER_CONFIG.STORAGE_KEYS.USER_HASH instead of literal 'fold_user_hash' - #1020
Merged
Merged
Conversation
…alStorage reads
Six components called localStorage.getItem('fold_user_hash') directly,
bypassing the BROWSER_CONFIG.STORAGE_KEYS.USER_HASH constant that
authSlice / Header.removeItem / client / useAuthInitialization already
flow through. Swap the literal for the constant in:
- components/Header.tsx
- components/tabs/SmartFolderTab.tsx
- components/tabs/IngestionTab.tsx
- components/tabs/llm-query/ImageThumbnail.tsx
- components/settings/OrgSettingsPanel.tsx
- components/data-browser/shared.tsx
Follow-up to #1019 (named in its OUT OF SCOPE section).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
shiba4life
enabled auto-merge
May 12, 2026 10:15
shiba4life
disabled auto-merge
May 12, 2026 10:16
shiba4life
enabled auto-merge
May 12, 2026 10:16
3 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Six components called
localStorage.getItem('fold_user_hash')directly, bypassing theBROWSER_CONFIG.STORAGE_KEYS.USER_HASHconstant thatauthSlice/Header.removeItem/client/useAuthInitializationalready route through. Swap each literal for the constant so the storage key has a single source of truth.Files touched:
components/Header.tsxcomponents/tabs/SmartFolderTab.tsxcomponents/tabs/IngestionTab.tsxcomponents/tabs/llm-query/ImageThumbnail.tsxcomponents/settings/OrgSettingsPanel.tsxcomponents/data-browser/shared.tsxNet diff: 6 modified literal lines + 5 new
BROWSER_CONFIGimport lines (Header already had it) = 11 line changes across 6 files. The constant itself (constants/config.ts) and its test are unchanged.Follow-up to #1019, which named this in its OUT OF SCOPE section.
Test plan
npm run typecheckcleannpm test— 788/788 tests pass (constants test included)'fold_user_hash'incomponents/, 7BROWSER_CONFIG.STORAGE_KEYS.USER_HASHreferences (6 new + 1 pre-existingremoveItemcall inHeader.tsx)🤖 Generated with Claude Code