shutterbase / shutterbase/shutterbase
Minor backend/wasm hardening (deferred non-blockers from v3 review)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8
- Forks
- 3
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 8
Description
Small, individually-low-risk items surfaced during the v3 review and accepted as non-blocking. Grouped to avoid issue spam; split out if any one grows teeth.
- Default-tag first-use race —
findOrCreateDefaultTag: concurrent first uploads into a fresh project can race to create the same default tag. Self-heals (unique constraint / next read), but worth aGetOrCreateupsert or advisory lock. - Statistics N+1 — the statistics endpoint issues per-entity queries in a loop; fine at current scale, candidate for a single aggregate query if it shows up in latency.
- Image-create not transactional — record insert + derived work aren't wrapped in one tx; a mid-flight failure can leave partial state. Currently self-correcting on retry; wrap if it ever causes visible inconsistency.
- WASM error-path memory —
ui/src/util/fileProcessor.tsretains the originalArrayBufferon some error paths (known FIXME); release on failure to cap peak memory during large batch uploads.
Filed as a deferred finding from the v3 rewrite review (#44/#45/#46/#47). Non-blocking; tracked for a follow-up.
Contributor 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.
Research direction
Choose one deferred item before starting, since this issue groups four separate concerns. Inspect findOrCreateDefaultTag, the statistics endpoint, the image-create flow, or ui/src/util/fileProcessor.ts, depending on the selected scope. Done means addressing the chosen race, query pattern, partial-state risk, or error-path buffer retention without expanding into the other non-blocking findings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, typescript, wasm
- Domain
- api, backend, frontend, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100