Uh oh!
There was an error while loading. Please reload this page.
Scope DiffPanel patch cache keys by theme - #94
Conversation
- pass a cache scope into `getRenderablePatch` and include resolved theme in DiffPanel cache keys - add a test proving `buildPatchCacheKey` changes when cache scope changes
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
WalkthroughThe changes extend the caching mechanism in diff rendering to support theme-scoped cache keys. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Uh oh!
There was an error while loading. Please reload this page.
…dored subtrees Closes two advisories against the desktop app the fork ships. Upstream is still on 41.5.0, so the sync does not deliver this — it is a fork-owned pin that retires itself once upstream passes 41.10.3. - GHSA #94 (high): a sandboxed iframe can bypass the `allow-popups` restriction via the OpenURL navigation path. Fixed in 41.10.3. - GHSA #92 (medium): `ProtocolResponse.url` reuses the default session cache instead of the registering session. Fixed in 41.9.1. Dependabot bumped `apps/desktop/package.json` alone, so `vp install` failed on the frozen lockfile in 40s and CI never reached typecheck. Regenerated `pnpm-lock.yaml` with `pnpm install --lockfile-only`; the diff stays inside the electron tree and nets -37 lines. Also adds `.github/dependabot.yml` (fork-owned; upstream has none) ignoring `.repos/**`, and records the seam-ledger rows the change owes: `apps/desktop/package.json` as row 36, and `pnpm-lock.yaml` grown to risk 12416, now the top row.
…dored subtrees Closes two advisories against the desktop app the fork ships. Upstream is still on 41.5.0, so the sync does not deliver this — it is a fork-owned pin that retires itself once upstream passes 41.10.3. - GHSA #94 (high): a sandboxed iframe can bypass the `allow-popups` restriction via the OpenURL navigation path. Fixed in 41.10.3. - GHSA #92 (medium): `ProtocolResponse.url` reuses the default session cache instead of the registering session. Fixed in 41.9.1. Dependabot bumped `apps/desktop/package.json` alone, so `vp install` failed on the frozen lockfile in 40s and CI never reached typecheck. Regenerated `pnpm-lock.yaml` with `pnpm install --lockfile-only`; the diff stays inside the electron tree and nets -37 lines. Also adds `.github/dependabot.yml` (fork-owned; upstream has none) ignoring `.repos/**`, and records the seam-ledger rows the change owes: `apps/desktop/package.json` as row 36, and `pnpm-lock.yaml` grown to risk 12416, now the top row.
…dored subtrees Closes two advisories against the desktop app the fork ships. Upstream is still on 41.5.0, so the sync does not deliver this — it is a fork-owned pin that retires itself once upstream passes 41.10.3. - GHSA #94 (high): a sandboxed iframe can bypass the `allow-popups` restriction via the OpenURL navigation path. Fixed in 41.10.3. - GHSA #92 (medium): `ProtocolResponse.url` reuses the default session cache instead of the registering session. Fixed in 41.9.1. Dependabot bumped `apps/desktop/package.json` alone, so `vp install` failed on the frozen lockfile in 40s and CI never reached typecheck. Regenerated `pnpm-lock.yaml` with `pnpm install --lockfile-only`; the diff stays inside the electron tree and nets -37 lines. Also adds `.github/dependabot.yml` (fork-owned; upstream has none) ignoring `.repos/**`, and records the seam-ledger rows the change owes: `apps/desktop/package.json` as row 36, and `pnpm-lock.yaml` grown to risk 12416, now the top row.
Summary
DiffPanelpatch parsing to pass a cache scope intobuildPatchCacheKeydiff-panel:light/diff-panel:dark) to avoid cross-theme reusegetRenderablePatchbehavior unchanged aside from configurable cache scopingbuildPatchCacheKeychanges when cache scope changesTesting
apps/web/src/lib/diffRendering.test.tsverifies different cache scopes produce different keysNote
Low Risk
Low risk: changes only adjust diff parsing cache-key scoping to avoid cross-theme reuse, plus a small unit test; no data/auth flows affected.
Overview
DiffPanelnow scopes patch parsing cache keys by the resolved theme (e.g.diff-panel:lightvsdiff-panel:dark) by threading acacheScopeintogetRenderablePatch()andbuildPatchCacheKey()usage, preventing cached diff artifacts from being reused across themes.Adds a unit test ensuring
buildPatchCacheKey()output changes when the provided scope changes.Written by Cursor Bugbot for commit 8a567ba. This will update automatically on new commits. Configure here.
Note
Scope DiffPanel patch cache keys by theme and modify
apps/web/src/components/DiffPanel.tsxto passcacheScopetogetRenderablePatchAdd
cacheScopetogetRenderablePatchand includeresolvedThemein the DiffPanel memo to derive theme-scoped patch cache keys; add a test forbuildPatchCacheKeyscope variance in diffRendering.test.ts.📍Where to Start
Start with the
DiffPaneluseMemoforrenderablePatchin DiffPanel.tsx and then reviewgetRenderablePatchusage ofcacheScope.Macroscope summarized 8a567ba.
Summary by CodeRabbit
Release Notes
Improvements
Tests