🤖 localStorage budgets: bound user-input-sized values at their producers (policy follow-ups from #5225)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- desktop, developer-experience
Research direction
Start with the budget policy in src/common/constants/storage.ts, then trace the producers named in the issue, including useWorkspaceName.ts, FileTree state, and migrateWorkspaceStorage. Confirm each owner’s oversized-value behavior and identify the restore or migration paths that need coverage. Done means all six instances have an agreed bounded producer or migration behavior and tests for persistence and restoration.
Written by the indexing model from the issue text.
Description
Follow-up to #5225. The priority instance there (the creation draft list) moved to the backend (#5232, #5234), and #5225 closes with a documented budget policy (registry comment in src/common/constants/storage.ts): a key's budget must cover the largest value its owner writes, and an owner whose value grows with user input bounds it where it is produced. The session-only fallback for an over-budget value is a safety net, not a supported path.
These known instances break that policy. Each one needs a valid but rare input. On a hit, the newest value lives in memory for the session, and a restart restores the last value that fit.
Instances and recommended fix shape
selectedWorkspace(global, 2048). The value embedsprojectPath,projectNameandnamedWorkspacePath, so very long paths push it over. Recommended: persist only the workspace id and re-derive the rest from metadata on restore (a behavior change with a restore path to test).workspaceNameStatefor creation drafts (4096). A message of 2000 raw chars or fewer that is heavy in JSON escapes can serialize over.lastGeneratedForis already capped by raw length, butmanualName(a name the user typed) has no length bound. A typed name over ~4 KB would be lost after a restart, so this is the one item that touches typed input. Recommended: bound both by serialized length at the producer (useWorkspaceName.ts).model:{ws}(per workspace, 128). A custom provider model id longer than about 126 chars. Recommended: persist a bounded reference, or validate custom model id length where it is entered. Raising the budget costs ×210 in the budget model.statusState:{ws}(per workspace, 512). Astatus_setwith a long URL. Recommended: bound the URL (or drop it) when the status is stored.- File-tree expansion (per workspace, 512). FileTree keeps its full expansion map only in component state and persists the newest overrides that fit. After the Review panel remounts, 13 of 82 expanded folders were restored in remote UAT. Recommended: lift the live map to a per-workspace module store (session scope); the persisted part stays bounded.
migrateWorkspaceStorageof an oversized legacy value. The source is kept, but the destination copy is session-only and nothing retries the migration. Recommended: persist a bounded transform at the destination, or record the migration as incomplete and retry it.
None of 1, 3, 4, 5 or 6 loses typed input: they are preferences or UI state, and item 6 keeps its source. Item 2 does for a manual name over ~4 KB.
Refs #5225
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $13.71
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 139
- Avg merge
- 6h 35m
- Merged PRs (30d)
- 819
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coder/xum
-
approved
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
🤖 Delegated-turn delivery and peer-limit follow-ups from #5311 and #5327Possibly taken @ThomasK33 claimed this today. Open
Maintainers usually reply within 1 day
-
🤖 Compaction follow-up dispatch: remaining follow-ups from #5313Possibly taken @ThomasK33 claimed this today. Open
Maintainers usually reply within 1 day
-
🤖 Concurrency primitive and fileLock hazards found by the formal models (#5309, #5319 follow-ups)Possibly taken @ThomasK33 claimed this today. Open
Maintainers usually reply within 1 day
-
🤖 History persistence follow-ups from the formal-verification fixes (#5312, #5316, #5318)Possibly taken @ThomasK33 claimed this today. Open
Maintainers usually reply within 1 day
Similar issues
-
area/frontend good first issue kind/cooldown
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
voidzero-dev/oxc-angular-compiler#511 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
langchain-ai/deepagentsjs#898 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
anomalyco/models.dev#8509 · 2 comments ·
Maintainers usually reply within 1 day
-
bug documentation P2 UI/UX
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day