Skip to content

Split local data stores and analysis configuration - #16

Merged
dills122 merged 5 commits into
mainfrom
feature/refactor-wrap-up-notes
Jun 7, 2026
Merged

dills122 merged 5 commits into
mainfrom
feature/refactor-wrap-up-notes

Conversation

@dills122

@dills122 dills122 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Finishes the current refactor pass by splitting browser local data storage and analysis configuration into focused modules.
  • Documents the config/constants-driven standard for future work.

What Changed

  • Replaced apps/web/src/lib/db.ts with a small public facade.
  • Added focused local data modules for schema, repositories, import events, analysis results, local profile, operation locks, and reset behavior.
  • Extracted analysis plan/version constants into analysis-config.ts.
  • Extracted category rules into category-config.ts.
  • Extracted scoring weights, thresholds, penalties, and label cutoffs into scoring-config.ts.
  • Updated code audit and steering docs to capture completed refactors and the no-magic-values standard.

Validation

  • pnpm --filter @forage/web test -- db.test.ts local-operation-lock.test.ts
  • pnpm --filter @forage/web typecheck
  • pnpm --filter @forage/analysis test
  • pnpm --filter @forage/analysis typecheck
  • npm run check:analysis
  • npm run check:docs
  • npm run check:workspace
  • pnpm lint
  • pnpm check

Scope Notes

  • This is a behavior-preserving refactor.
  • Existing imports from apps/web/src/lib/db.ts remain stable through the facade.
  • Analysis behavior is unchanged; rules, weights, thresholds, and versions are now config-driven.

@dills122
dills122 merged commit 8a38489 into main Jun 7, 2026
1 check passed
@dills122
dills122 deleted the feature/refactor-wrap-up-notes branch June 11, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant