Skip to content
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
shiba4life merged 1 commit into
mainfrom
kanban/7758e-browser-config-user-hash
May 12, 2026
Merged

refactor(frontend): use BROWSER_CONFIG.STORAGE_KEYS.USER_HASH instead of literal 'fold_user_hash'#1020
shiba4life merged 1 commit into
mainfrom
kanban/7758e-browser-config-user-hash

Conversation

@shiba4life

Copy link
Copy Markdown
Collaborator

Summary

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 route through. Swap each literal for the constant so the storage key has a single source of truth.

Files touched:

  • 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

Net diff: 6 modified literal lines + 5 new BROWSER_CONFIG import 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 typecheck clean
  • npm test — 788/788 tests pass (constants test included)
  • post-edit greps: 0 literal 'fold_user_hash' in components/, 7 BROWSER_CONFIG.STORAGE_KEYS.USER_HASH references (6 new + 1 pre-existing removeItem call in Header.tsx)
  • CI: Rust tests, Frontend Tests, E2E UI Tests, CodeQL

🤖 Generated with Claude Code

…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
shiba4life enabled auto-merge May 12, 2026 10:15
@shiba4life
shiba4life disabled auto-merge May 12, 2026 10:16
@shiba4life
shiba4life enabled auto-merge May 12, 2026 10:16
@shiba4life
shiba4life added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit eff65ea May 12, 2026
12 checks passed
@shiba4life
shiba4life deleted the kanban/7758e-browser-config-user-hash branch May 12, 2026 10:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant