Repository navigation
chore: modernize desktoppet (rebirth one-pass) - #110
Merged
Merged
Conversation
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.
One-pass modernization from the portfolio rebirth (spec built from this repo's assessment notes).
Goal
DesktopPet (Tauri 2 + React 19 + TS 7 + Vite 8) is functional but has data-loss bugs, false claims and unpinned toolchains. Evidence comes from the assessment at
main@f62512dand a scratch-clone execution run. I could not rungit show origin/mainhere (Bash was denied), so I read the working checkout instead. Treat every line number below as unverified againstorigin/mainand re-grep before editing.src-tauri/src/models.rs:432,commands/maintenance.rs:26,62,125).AppSnapshotdefaults missing fields, so{}imports as a reset.commands/pet.rs:118,509).storage.rs:13relabels schema versions without a migration.src/hooks/usePomodoro.ts:356,399,focus_guardrails.rs:123,140). Calm-mode signals come from the panel (useContextAwareChill.ts:40-58).achievements.rs:195,279).describe.skipwith type-checking suppressed (src/hooks/__tests__/usePomodoro.test.ts:1,59). Completion is fire-and-forget (usePomodoro.ts:205,227), and the countdown decrements per callback instead of using a deadline.pet.accessories, which shop code treats as ownership (commands/customization.rs:158,shop.rs:70). Re-completing a task repeats the XP award (commands/tasks.rs:70), andprogression.rs:105mutates state withoutStoreLock.npm run lintisprettier --check .and fails on 75 files in the clone run. The macOS DMG step fails there too, while--bundles apppasses..node-version, nopackageManager, norust-toolchain.toml.Makefilecalls pnpm, which this repo does not use (npm lockfile).dtolnay/rust-toolchain@stable. Actions are tag-pinned (@v7), not SHA-pinned, andci.ymlhas nopermissions.verify:required:frontendmixes in network security scans.scripts/perf/memory-smoke.mjs) never loads app code.perf-enforced.ymlreferences the missingtests/perf/api.k6.jsand runs PostgreSQL checks against a JSON-store app..env.exampleadvertises an API, a database and port 3000, but Vite uses 5173.@tauri-apps/plugin-storeand the Rustlogcrate have no uses.src/lib/clipboard.ts:102,152andcheckTimeAchievementinsrc/lib/tauri.ts:88have no callers.test:uiandtest:coveragelack their optional Vitest packages.docs/release-candidate-status.mdoverstates signing readiness.AGENTS.mdhas a snapshot status ("existing local changes are PR-template metadata") and machine-specific/Users/.../.codexinheritance. There is noCLAUDE.md. The README has no## Statussection.What to build
{}, malformed and future-schema input. Keep the previous state if the import or save fails. Stop truncating exported collections. Add round-trip equality tests.u32::MAXand unchecked additions (pet.rs:51,pomodoro.rs:113) with checked or saturating arithmetic.useFocusGuardrails.ts:8and catch the photo-card rejection inPetPanel.tsx:95, surfacing an error..node-version(an exact Node version that satisfies jsdom).packageManager: "npm@x.y.z"and anenginesfield.src-tauri/rust-toolchain.tomlwith the exact stable plusrustfmtandclippy. Keep therust-versionMSRV inCargo.tomlconsistent with it.node-version-file: .node-version, anddtolnay/rust-toolchainpoints at the pinned toolchain.--lockedinscripts/tauri-rust-test.shand everywhere else cargo runs.Makefilefor npm (install=npm ci).make checkis non-mutating and fails with a setup hint when node, npm or cargo is missing.make checkrunsprettier --check, tsc, vitest,cargo fmt --check,cargo clippy --locked --all-targets -D warnings,cargo test --lockedandnpm run build.prettier --writeas a mechanical commit of its own, then add a.prettierignorefor generated output.verify:required:frontendoffline and putsecurity:scanin a separate script and CI job.ci.ymlcallsmake checkon macOS (ubuntu for the frontend-only subset is optional).permissions: contents: read.perf-enforced.ymlk6/PostgreSQL lanes andscripts/perf/memory-smoke.mjs, but keep the bundle and asset budget checks.--bundles appand document the DMG as release-only. Do not claim the cause of the failure.plugin-storeandlogdependencies, the unused helpers, the unreachableRun Validationaction (or make it explicit), and the optionaltest:ui/test:coveragescripts..env.exampleto real inputs or delete it.constants.tsvsshop.rsandpet.rs) only where it is a small, test-covered move.AGENTS.mduses the shape Purpose, Layout, Setup, Checks, Boundaries, Delivery. Drop the.codex/path inheritance and the snapshot status.CLAUDE.mdcontains only@AGENTS.md.## Statuswith### Stack,### Known risks,### Next steps, plus correct prerequisites and amake checkinstruction.docs/release-candidate-status.mdas historical and remove claims it cannot back.Builder report:
Lockfile rationale
package-lock.json: regenerated under the pinned npm 12.2.0 and Node 22.23.3 toolchain (newpackageManager/enginesfields), and drops the unused@tauri-apps/plugin-storedependency.src-tauri/Cargo.lock: only the app crate's own dependency list changes (the unused directlogdependency is removed;logstays as a transitive dependency). No packages are added, removed or re-versioned.npm cifollowed bymake check(which runscargo test --locked).