Uh oh!
There was an error while loading. Please reload this page.
refactor(shared): move the node:sqlite Effect SQL client into shared - #7272
refactor(shared): move the node:sqlite Effect SQL client into shared#7272juliusmarminge wants to merge 2 commits into
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
Reviewed the changed Effect service code (desktop BrowserSession/PreviewManager, server ProviderService, the NodeSqliteClient move) against the service conventions. Service definition order, inline Context.Service interfaces, make/layer exports, Foo["Service"] references, environment-based dependency acquisition, and the pure module move with no compatibility shims all look consistent. One import-convention deviation in the new contracts module is noted inline.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
One finding: the new leading-icon utility on MenuSubTrigger also matches the chevron on sub-triggers that have no leading icon, which regresses the two existing icon-less sub-triggers (DiffPanel "Turn", PreviewMoreMenu "Appearance"). Details inline.
Posted via Macroscope — UI Consistency
Correction to my previous review comment: the inline note referenced Posted via Macroscope — Effect Service Conventions |
UI consistency finding (inline comment could not be attached —
The new class string starts with Smallest fix: scope the utilities away from the last child, which never matches the chevron and behaves identically for real leading icons: - "[&>svg:first-of-type]:-mx-0.5 flex min-h-8 cursor-pointer items-center gap-2 ... [&>svg:first-of-type:not([class*='opacity-'])]:opacity-80 [&_svg]:pointer-events-none [&>svg]:shrink-0",+ "[&>svg:not(:last-child)]:-mx-0.5 flex min-h-8 cursor-pointer items-center gap-2 ... [&>svg:not(:last-child):not([class*='opacity-'])]:opacity-80 [&_svg]:pointer-events-none [&>svg]:shrink-0",(the Posted via Macroscope — UI Consistency |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR is a mechanical relocation of an unchanged SQLite client into the shared package, with corresponding export and import updates. The production loader continues to use the same implementation, and no product defaults or user-facing behavior change. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
f7f7164 to
ea5198fCompareThread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ea5198f to
d98f7fbCompared98f7fb to
9b26f68Compare9cd8c24 to
aae2535Compareaae2535 to
4ab2301Compare55a4dd7 to
43c0bedCompare43c0bed to
d809895Compare71cdc41 to
a999041CompareDismissing prior approval to re-evaluate a999041
a999041 to
cef88ccComparecef88cc to
970f51cCompare193805f to
5c239bfCompareThe desktop app needs to read browser cookie databases and should reach for the same Effect SQL client the server already uses rather than opening `node:sqlite` by hand. Nothing about the client is server-specific, so it moves to `packages/shared` and both apps import it from there. Pure move plus import updates; the client itself is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
5c239bf to
6ba7425Compare
The desktop app needs to read browser cookie databases and should reach for the same Effect SQL client the server already uses, rather than opening
node:sqliteby hand. Nothing about the client is server-specific, so it moves topackages/sharedand both apps import it from there.Pure move plus import updates — the client itself is unchanged. Split out of #7255 so the cookie-import work reviews on its own.
Model: Claude Opus 5 (1M context), harness: Claude Code.
🤖 Generated with Claude Code
Note
Low Risk
Import-path refactor only; persistence still loads the same client at runtime, but any missed old import would fail at build time.
Overview
Relocates the node:sqlite-backed Effect
SqlClientimplementation fromapps/serverinto@t3tools/shared/nodeSqliteClient(same behavior; file renamed tonodeSqliteClient.ts) and exposes it via a new package export.Server scripts (
migrate-dev-db,t3-sqlite-state), migration tests, and the Node runtime loader inSqlite.tsnow import the shared module instead of a relative../NodeSqliteClientpath. The shared package test imports the local./nodeSqliteClient.tspath after the move.Reviewed by Cursor Bugbot for commit 6ba7425. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Move
NodeSqliteClientinto@t3tools/sharedpackageNodeSqliteClient.tsand its test fromapps/server/src/persistence/topackages/shared/src/(renamed to lowercasenodeSqliteClient), and adds a./nodeSqliteClientexport path in package.jsonapps/serverscripts, migration tests, and thedefaultSqliteClientLoadersloader to use@t3tools/shared/nodeSqliteClientinstead of relative paths@t3tools/shared/nodeSqliteClient; any remaining references to the oldapps/server/src/persistence/NodeSqliteClient.tspath will fail to resolveMacroscope summarized 6ba7425.