Fix storage, desktop, and responsive reliability gaps - #32
Merged
Conversation
Signed-off-by: Zeid Diez <69106534+zeidalidiez@users.noreply.github.com>
zeidalidiez
marked this pull request as ready for review
July 9, 2026 19:50
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.
Summary
.pm-suite/*.pms.json; add a strict CSP and correct the Tauri 2 package/config layoutWhy
The audit found several gaps where implementation and documentation diverged:
Impact
This prevents silent project relocation and accidental overwrite of externally changed or deleted data, gives desktop users actionable external-change handling, restores correct hosted PWA behavior, preserves import integrity, and keeps core project actions usable on tablet/mobile layouts.
Validation
npm test— 224 tests passednpm run typecheck— all workspaces passednpm run build— core, UI, desktop, and web builds passedVITE_GITHUB_PAGES=true npm run build:web— Pages-scoped manifest and service-worker registration verifiednpm run test:e2e— 12 Playwright flows passed, including tablet action bounds and mobile overflowcargo check --manifest-path apps/desktop/src-tauri/Cargo.toml— passedcargo test --manifest-path apps/desktop/src-tauri/Cargo.toml --lib— 2 native tests passednpm audit --omit=dev— 0 production vulnerabilitiesFollow-up
The full npm audit still reports six development-tool advisories in the Vite/Vitest/esbuild/PWA chain. Resolving those requires coordinated major-version upgrades and should be handled separately from these non-breaking fixes. The production builds also retain the existing >500 kB chunk warning, so route-level code splitting remains a useful follow-up.
Greptile Summary
This PR improves storage reliability, desktop watching, responsive shell behavior, and validation coverage. The main changes are:
Confidence Score: 5/5
Safe to merge with low risk.
No blocking or non-blocking code issues were found in the reviewed storage, watcher, import, shell, launcher, and test changes. The changed paths include focused coverage for stale-write rejection, storage target isolation, responsive behavior, and runtime checks.
No files require special attention.
What T-Rex did
Important Files Changed
.pm-suitefile commands and a fingerprint-based external-change watcher.Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant UI as AppShell / Launcher participant Store as Zustand Project Store participant Adapter as Web/Desktop Storage Adapter participant Disk as Browser Storage or .pm-suite File participant Watch as Desktop Watcher UI->>Store: edit project / mark dirty Store->>Adapter: save(key, json, externalRevision, targetTrust) Adapter->>Disk: read current JSON for fingerprint Disk-->>Adapter: current content or missing alt fingerprint matches expected revision Adapter->>Disk: write project JSON Adapter-->>Store: metadata with new contentRevision Store-->>UI: saved status + storage trust else stale or deleted content Adapter-->>Store: reject external-change save Store-->>UI: save failed / conflict banner end Watch->>UI: externalChange / deleted / renamed UI->>Adapter: reload from storage or keep local changes%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant UI as AppShell / Launcher participant Store as Zustand Project Store participant Adapter as Web/Desktop Storage Adapter participant Disk as Browser Storage or .pm-suite File participant Watch as Desktop Watcher UI->>Store: edit project / mark dirty Store->>Adapter: save(key, json, externalRevision, targetTrust) Adapter->>Disk: read current JSON for fingerprint Disk-->>Adapter: current content or missing alt fingerprint matches expected revision Adapter->>Disk: write project JSON Adapter-->>Store: metadata with new contentRevision Store-->>UI: saved status + storage trust else stale or deleted content Adapter-->>Store: reject external-change save Store-->>UI: save failed / conflict banner end Watch->>UI: externalChange / deleted / renamed UI->>Adapter: reload from storage or keep local changesReviews (1): Last reviewed commit: "Fix storage and desktop reliability gaps" | Re-trigger Greptile