Harden TimePrism project showcase - #2
Draft
Air000000 wants to merge 113 commits into
Draft
Conversation
Fold the approved compact Idle attribution behavior and explicit usage provenance into the hardening branch after Windows CI #137 passed with 52 Rust tests.
* test(window): pin DPI-safe pet sizing * fix(window): size pet in logical DPI units * fix(window): align configured pet height
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.
Scope
Hardens the public TimePrism repository without another broad architecture rewrite, adds explicit first-run tracking consent / persisted pause semantics, improves Idle correction/attribution, and fixes the Windows high-DPI pet prompt clipping found during real installer smoke.
Implemented
学习/休息while narrowly repairing only known mojibake values on existing DBs;学 / 休counters classification-based;LEARN / REST / IGNORErule;Continue <App> / Away / Other…when a candidate exists, orLearn / Break / Awayotherwise;Decide lateris secondary text;app_usage_logs.sourceprovenance (FOREGROUNDvsIDLE_CONFIRMED) and preserved that evidence boundary during foreground segment coalescing;220 x 262logical pixels in both settle/summon paths instead ofPhysicalSize, andtauri.conf.jsonis aligned to the same logical height;Verification
Current hardening branch HEAD:
cb95d2a5ff3e9e5b6462c9bad853134345e6ec78Windows CI
Run #142: https://github.com/Air000000/timeprism/actions/runs/34743763621
Passed on the current PR HEAD:
pnpm install --frozen-lockfile✅pnpm run typecheck✅pnpm run build:check✅cargo check --all-targets✅cargo test✅The new DPI tests pin both required invariants:
Known pre-existing warnings remain for unused
ForegroundSnapshotandManager; this PR does not claim a warning-free build.Windows installer packaging
Run #84: https://github.com/Air000000/timeprism/actions/runs/34743763617
Passed on the current PR HEAD:
Generated artifact:
TimePrism-0.1.0-windows-installers-pull_request1031289428815,951,885bytessha256:c01c5f9bd8467d2b267393486bf5f53f7538a773784854b6cef0072069a73e16d59cc59374b5d0017240be1e6a98febd7a121a99e4e48808a1909127aada6ee9fa5fdd667ab8624553a48b9be2cc2106e266e223a0a7b7e92be1f0d236ca1ae4Automated evidence proves the DPI sizing contract and installer production. The exact visual clipping case still requires the same real Windows scaled-display smoke that originally exposed it.
Remaining manual gates
This PR intentionally remains Draft.
S-050): verify no pre-init SQLite error, no capture before onboarding, correct disclosure, immediate activation, persisted Pause/Resume, pet tracking state, and existing lifecycle behavior.Decide later, and that the pet prompt is fully visible at the user's actual Windows DPI scaling.S-060): verify existing data survives, onboarding does not reappear, legacy tracking state/provenance migrate correctly, and later explicit pause persists.main.The app is unsigned, so Windows SmartScreen may report an unknown publisher.