Skip to content

docs: add portable upgrade walkthrough - #367

Merged
HafidIdrissi merged 6 commits into
HafidIdrissi:mainfrom
Furox-Art:docs/portable-upgrade-walkthrough
Oct 13, 2026
Merged

HafidIdrissi merged 6 commits into
HafidIdrissi:mainfrom
Furox-Art:docs/portable-upgrade-walkthrough

Conversation

@Furox-Art

@Furox-Art Furox-Art commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #100

What changed

Added a safe portable-upgrade and rollback guide in docs/PORTABLE_UPGRADE.md, linked from README.

Addressed the maintainer review in follow-up commits 62e1b7e and a030381:

  • Correct user settings path: Portable preferences are stored at the root of the portable folder, beside LocalTimeTracker.exe, not under data/. Both backup and copy/verification steps preserve the root preferences.json when present.
  • Safe production procedure: Clearly separates commands acting on actual user paths from the disposable validation. Requires closing both copies, a newly named backup and extraction/rollback destinations, a verified intact backup, and never overwriting the old folder or copying old application binaries over the new release.
  • Optional paths: Handles data, reports, config.json and root preferences.json independently when they exist. A separate Windows case tests absence of reports/config/preferences and verifies no accidental nested data directory.
  • Accurate testing claims: Differentiates native Windows PowerShell commands and GUI smoke test from fixture creation with WSL Python, and explicitly names unperformed GUI and cross-version checks.

Validation actually performed (12 October 2026)

  • Environment: Windows 11 build 26200, Windows PowerShell 5.1, genuine v1.3.0 portable release ZIP, checksum file from the release.
  • Fixture: one fictional 15-minute activity period in SQLite, fictional HTML report, config.json and root preferences.json with sample_seconds=5 and idle_minutes=10. Fixture generated using WSL Python; no real user activity was used.
  • Native Windows commands: Get-FileHash matched published SHA-256; Copy-Item created a fresh backup; full backup matched 1,004 files by SHA-256; Expand-Archive extracted to a fresh folder; Copy-Item preserved all 4 existing user paths with SHA-256 equality. A fresh rollback copy matched all 1,004 files, with the original backup unchanged.
  • Additional optional-paths-absent PowerShell test: data copied successfully; absent reports/config/preferences were skipped; no nested data/data directory created.
  • Real LocalTimeTracker.exe v1.3.0 launched on Windows; its window title was detected; test process was closed afterwards.

Latest verification (13 October 2026 TR)

  • Documented SHA256SUMS PowerShell parser: 8/8 passed on Windows with the genuine v1.3.0 manifest and text/binary markers; correctly rejects missing, duplicate, suffix-only, wrong-hash, and malformed-hash entries. Final parser correction is in commit efe7099.
  • Native Windows Tk GUI code-path: Windows Actions run passed. The actual repository v1.3.0 Tk settings controls showed 5-second sampling and 10-minute idle threshold, the "Reports and data" tab's report button callback generated an HTML report containing the fictional 15-minute activity period, and a fresh restored copy preserved those settings and the SQLite record. The test explicitly disabled live tracking. Test source is on an isolated validation branch, not included in this documentation PR.
  • Real packaged EXE: LocalTimeTracker.exe v1.3.0 previously launched successfully on the disposable Windows machine; its window title was observed and the process closed.
  • Scope limitation: The Tk GUI test was a native Windows source GUI widget invocation, not physical mouse/keyboard input against the packaged EXE. An actual cross-version upgrade was not tested. Prior native Windows PowerShell copy and rollback verification of 1,004 files remains valid.
  • CI distinction: Upstream Tests run 38191824971 passed for an older revision, while the latest PR commit needs a maintainer to authorize its own action_required workflow; no current-head upstream green CI is claimed. The final doc commit a3a2831 contains no [skip ci].

All changes remain scoped to issue #100.

Closes #100

A complete walkthrough for upgrading a portable installation while
keeping recorded activity, reports and preferences: stopping the old
copy, backing up and verifying the backup, downloading and checking
the new release ZIP, extracting beside the old folder, carrying data/
reports/config.json across, confirming the data in the new copy, and
rolling back without overwriting the backup.

The file-level steps were executed with disposable folders and
fictional activity against the real v1.3.0 release; observed results
are recorded in the document.

@HafidIdrissi HafidIdrissi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for documenting the upgrade and distinguishing your WSL file checks from Windows execution. I reviewed both changed files at 8f5672e. Please correct these points before this can be approved:

  1. windows_app.py loads/saves APP_DIRECTORY / "preferences.json", beside the executable in portable mode, not data/preferences.json. Fix the tree, backup checklist, copy commands, settings check and validation fixtures to include root-level preferences.json (when present). Copying only data, reports and config.json loses actual sampling/idle preferences.
  2. Separate the production upgrade instructions from the disposable demonstration. The opening currently says every step touches only fictional data, while the recipe later tells users to copy and eventually delete their installation. State explicitly that users must substitute their own paths and preserve their verified backup. Require fresh/non-existing backup and destination folders so repeating Copy-Item cannot silently create a nested layout. Treat optional preferences/config/reports paths as optional throughout, including backup checks.
  3. WSL copy/hash checks do not verify PowerShell behavior or the desktop settings/data/report steps. Replace the claim that Linux equivalents were executed 'exactly as written' with the actual shell commands/environment and clearly mark Windows commands and native walkthrough steps as not performed. After fixing the preferences path, validate the documented commands in a disposable Windows folder: stop both copies, copy/verify all existing user files, start the new copy, check preferences and generate a report from fictional stored activity, then restore to a fresh folder without changing the backup. Report actual versions/results and any remaining skips; do not imply a cross-version upgrade if only v1.3.0 was exercised.

Keep this focused on #100. The Tests run https://github.com/HafidIdrissi/Time-Tracker/actions/runs/38191824971 is awaiting maintainer 'Approve and run'; no tests from that run have executed. I have not run local tests or a native walkthrough.

Copy link
Copy Markdown
Contributor Author

@HafidIdrissi — thank you for the source-pinned review. I addressed the documentation and data-safety points on the PR branch:

  1. Preferences path corrected: The guide now shows/backs up/copies/verifies root-level preferences.json (APP_DIRECTORY / "preferences.json"), not data/preferences.json. All four user paths are independently optional.
  2. Production vs. demonstration clarified: Commands that touch a real installation are clearly separated from the fictional, disposable Windows validation. The guide requires absent backup/new/rollback destinations, checks for active processes, hashes the complete backup, avoids nested Copy-Item destinations, and never overwrites the verified backup.
  3. Native Windows testing actually executed: Windows 11 build 26200 / PowerShell 5.1 with official v1.3.0 ZIP; Get-FileHash verified its published checksum, Copy-Item + SHA-256 verified 1,004 files in the full backup, all existing user paths matched after extraction, and rollback to a fresh destination matched 1,004 files with the original backup unchanged. A second native PowerShell test confirmed optional reports/config/preferences can be absent without errors or nested data directories. The actual LocalTimeTracker.exe v1.3.0 launched on Windows and its window was detected, then the test process was closed.
  4. Explicitly not claimed: The Tkinter UI could not be traversed by the Windows GUI automation, so I did not verify the visual settings values or generate a report via the native UI. Those are documented as manual checks. No cross-version upgrade was run: this is a v1.3.0-to-v1.3.0 rehearsal. WSL Python was used only to generate the fictional SQLite fixture and is not misrepresented as native Windows execution.

Commits: 62e1b7e + a030381. The PR description and documentation now accurately list the executed checks and the remaining native GUI verification gap.

The upstream Tests workflow still awaits your approval; I am not claiming it passed. Please let me know if the remaining GUI check is required before re-review.

@HafidIdrissi HafidIdrissi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Furox-Art — I re-reviewed the full two-file diff at a030381. The root-level preferences path, optional user paths, fresh copy destinations, production/test distinction and honest Windows validation limits address the main documentation corrections.

Yes, the remaining native settings/report check is still needed before final approval of this preservation walkthrough. In the disposable v1.3.0 rehearsal, open the new copy and confirm the visible 5-second sampling / 10-minute idle settings, generate a report covering the fictional 15-minute period, and check the resulting HTML includes that period. After stopping/closing and restoring to a fresh folder, confirm the restored settings/data too. This can be a manual mouse/keyboard walkthrough; Tk controls need not be accessible to an automation API. Report only observed results. A cross-version upgrade is not newly required: keeping the rehearsal's limits explicit is sufficient.

One small correction remains in step 4: EndsWith($filename) is a suffix match, not exact manifest filename matching (a line for OtherLocalTimeTracker-...zip can also match). Parse each checksum line into its hash and filename, handle the optional * marker, compare the complete filename, and require exactly one matching valid SHA-256 entry. Check the documented recipe with a genuine entry and synthetic missing/duplicate/suffix-only entries; those must not be accepted as the exact target.

CI update: run 38191824971 now succeeded, but it belongs to the old 8f5672e revision. The current a030381 revision has no workflow runs/checks; both follow-ups use [skip ci]. Please submit the focused documentation correction without a skip directive so CI can run against the revision being reviewed. If GitHub requests authorization for that new run, the maintainer will need to use 'Approve and run'. I have not executed local tests or the Windows walkthrough. No merge/approval yet.

Copy link
Copy Markdown
Contributor Author

@HafidIdrissi — I addressed your follow-up review on #100 and updated the PR description and documentation at current head a3a2831.

  1. Exact checksum filename: The updated PowerShell recipe parses 64-hex SHA-256 entries, supports optional * markers, compares the complete filename, and requires exactly one match. Native Windows PowerShell CI executed the documentation's actual code against the genuine v1.3.0 ZIP/manifest and synthetic cases: 8/8 passed, including required rejection of missing, duplicate, suffix-only, wrong-hash and invalid-hash records.
  2. Windows UI/report validation: Windows Tk CI run passed: native Tk setting comboboxes returned 5-second sampling and 10-minute idle, the genuine report-button callback generated an HTML report containing the fictional 15-minute period, and a fresh restored folder retained the same settings and SQLite record. This used the actual v1.3.0 windows_app.py Tk GUI code on Windows (with automatic tracking disabled for privacy), not physical mouse input against the bundled EXE. The packaged Windows EXE was separately launched and its window detected in the earlier smoke test.
  3. Scope / honesty: A physical manual packaged-EXE walkthrough remains unperformed, and the test covered v1.3.0 → v1.3.0 only, not a cross-version upgrade. The guide and PR explicitly distinguish all of these validations.
  4. Upstream CI: The latest commit a3a2831 uses no [skip ci] directive, but its upstream Tests workflow currently shows action_required; could you approve/run it? The older successful workflow is not counted as current-head CI.

The isolated fork Windows test branch does not alter this docs-only PR. Please re-review the updated documentation and let me know if manual interaction with the packaged EXE is still a strict acceptance requirement.

@HafidIdrissi HafidIdrissi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Furox-Art — I reviewed the complete README/guide diff at a3a2831 and inspected both isolated fork workflows, the native Tk validation script and both job logs.

The exact checksum block matches the one actually exercised in run 38316721144: all eight Windows PowerShell cases pass, including the genuine manifest and required missing/duplicate/suffix-only/wrong/invalid-hash rejection. Run 38317255364 verifies the real native Tk settings widgets, invokes the actual report-button callback, checks the fictional report output, and verifies settings/database preservation after restoration, with live tracking disabled. These are fork CI results I inspected; the earlier local copy/binary checks remain author-reported. I have not executed a Windows walkthrough myself.

For this documentation-only task, that native UI-path evidence plus the separately reported packaged-EXE launch and file-preservation checks resolves the remaining settings/report validation item. A physical mouse-click packaged-EXE walkthrough is not an additional gate, provided the existing explicit limitations stay in the guide. No further documentation correction is requested at this revision.

The remaining gate is current-head upstream CI: https://github.com/HafidIdrissi/Time-Tracker/actions/runs/38317398283 is action_required on this exact head. The maintainer must use Approve and run; the connector has no dedicated execution-approval action. The earlier successful run does not validate this revision. Once this run succeeds, I can perform the final head/checks/auto-merge recheck and approve. No approval or merge performed now.

Copy link
Copy Markdown
Contributor Author

@HafidIdrissi — thanks for confirming that the documentation and validation requirements are satisfied at a3a2831. Could you please use Approve and run for the current-head Tests workflow when you have a moment? It remains action_required, so the final CI/approval gate cannot proceed until authorized. The earlier successful matrix took about 36 seconds after starting, though queue time may vary. Thank you.

@HafidIdrissi HafidIdrissi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete README/portable-upgrade guide diff at a3a2831. The root preferences, optional user paths, fresh backup/extraction/rollback destinations and exact unique SHA-256 filename match resolve the reported documentation defects. As recorded in my previous review, I inspected the fork validation source and both logs: eight PowerShell manifest cases and native Windows Tk settings/report/restoration checks pass; packaged-binary and cross-version limitations remain explicit.

Current-head upstream Tests run 38317398283 now succeeds. I inspected all three logs: 129 tests pass on Windows/Python 3.11, Windows/Python 3.13 and Ubuntu/Python 3.12. Those are CI results; author-local checks remain separately reported, and I have not executed tests or a Windows walkthrough myself. Rechecked the exact head, successful checks and absence of auto-merge. No blocking finding remains; approving this revision. No merge performed.

@HafidIdrissi
HafidIdrissi merged commit 420d812 into HafidIdrissi:main Oct 13, 2026
3 checks passed

Copy link
Copy Markdown
Owner

Merged — thank you @Furox-Art for the portable-upgrade guide and for completing the root-preferences, backup/rollback, exact-checksum and Windows validation follow-ups. Issue #100 is now closed. The final reviewed revision passed all three upstream core jobs (129 tests each), and the guide keeps the packaged-binary and cross-version validation limits explicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write a disposable-data walkthrough for upgrading a portable installation

2 participants