chore: act on the unambiguous findings from the architecture review - #84
Merged
Merged
Conversation
Four of the nine findings in #81 needed no judgement call, so they are done here. The rest — the layering leak into the database schema, the two oversized modules, the test-server footgun and the comment density — are questions about structure and house style, and they are left in the issue to be weighed rather than decided in a cleanup commit. Runtime dependencies were all declared as dev dependencies, and `dependencies` was empty. arctic signs users in; drizzle-orm and @libsql/client reach the database. It worked only because everything is bundled at build time — it breaks on any install with `--omit=dev`, and it quietly files every advisory against those three as a development-only risk. The lockfile is regenerated so `npm ci` still resolves. Two exports were dead. `RATE_LIMIT` was never read: the real ceiling lives on the Cloudflare binding, so the constant was a copy of configuration that could drift from it silently and nothing would notice. `loadShareSettings` arrived with the share feature and was never wired up — My List reads those columns inline — so it and the suite that only exercised it both go. The clipboard fallback existed three times, and its wording had already started to drift between the copies. What is genuinely shared is the write and the sentence said when a browser refuses it; what differs is how each caller gets the text in front of the reader, so that part is a callback. The share button needs it: unlike the two panels it has no field on screen until the clipboard has actually refused, so revealing one is part of its fallback. `worker-configuration.d.ts` is marked generated. It is wrangler output — about twenty lines of this project's bindings inside ~14,800 lines of pinned workerd typings — and committing it is correct, because CI has no generate step and would fail the type-check without it. Marking it keeps it out of diffs and out of the language breakdown; it is not refactored.
36 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #81 — the four findings that needed no judgement call. The full review is in the issue.
Deliberately not here: the layering leak (F5), the two oversized modules (F6, F7), the test-server footgun (F2) and the comment density (F9). Those are questions about structure and house style — they belong to you, not to a cleanup commit.
F1 · Runtime dependencies were declared as dev dependencies
dependencieswas empty.arcticsigns users in;drizzle-ormand@libsql/clientreach the database.It worked only because everything is bundled at build time, so nothing is resolved at runtime. It breaks on any install with
--omit=dev, and it quietly files every advisory against those three packages as a development-only risk. Lockfile regenerated — verifiednpm cistill resolves, and that all three now record asproductionrather thandev.F3 · Two dead exports
RATE_LIMITwas never read. The real ceiling lives on the Cloudflare binding inwrangler.jsonc, so the constant was a copy of configuration free to drift from it with nothing to notice.loadShareSettingsarrived with the share feature and was never wired up — My List reads those columns inline. It and the suite that only exercised it both go, which is why the test count moves 490 → 488.The seven module-private-but-exported symbols from F3 are not touched: several of their siblings are public specifically so they can be unit-tested, and telling those apart is a per-symbol judgement, not a sweep.
F4 · The clipboard fallback existed three times
CalendarFeed,ShareListandShareButtoneach carried their own copy, and the wording had already started to drift between them.What is genuinely shared is the write and the sentence said when a browser refuses it. What differs is how each caller gets the text in front of the reader — so that is a callback rather than a field.
ShareButtonneeds that: unlike the two panels, it has no field on screen until the clipboard has actually refused, so revealing one is part of its fallback.F8 ·
worker-configuration.d.tsmarked generatedNot refactored — the review's conclusion is that it is correct as it stands. It is wrangler output: 17 lines of this project's bindings inside 14,801 lines of workerd typings pinned to the compatibility date.
linguist-generated=truekeeps it out of diffs and out of the language breakdown.Verified
npm run check— 0 errors, 0 warnings;npm run lintcleannpm ciresolves against the regenerated lockfile.icsURL, correct toastNo console errors.