Skip to content

feat(autostart): preserve named profile at login - #133

Merged
ErikBjare merged 3 commits into
ActivityWatch:masterfrom
TimeToBuildBob:feat/profile-aware-autostart
Sep 8, 2026
Merged

ErikBjare merged 3 commits into
ActivityWatch:masterfrom
TimeToBuildBob:feat/profile-aware-autostart

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Summary

  • preserve the active named profile in the OS login command
  • isolate Linux desktop files, macOS LaunchAgents, and Windows Run values per profile
  • keep the installer's Windows startup shortcut scoped to the default profile
  • document profile-aware Start at login behavior

Verification

  • PYTHONPATH=$PWD uv run --no-project --with 'pytest<9' --with 'aw-core>=0.5.18' --with 'PyQt6==6.5.3' pytest -q tests/test_autostart.py (58 passed)
  • PYTHONPATH=$PWD uv run --no-project --with 'mypy<2' --with 'aw-core>=0.5.18' --with 'PyQt6==6.5.3' --with 'types-click' mypy aw_qt/autostart.py --ignore-missing-imports --python-version 3.9
  • production-config local AI review: 5/5, no findings, head bdfe43179fbeb66090c36f7216072a142556205e

@TimeToBuildBob

TimeToBuildBob commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

🤖 AI code review

Safe to merge — no P0/P1 findings

Confidence 5/5

No findings. The diff looks correct to me on this pass.

Reviewed bdfe43179fbe · openrouter/google/gemini-2.5-flash-lite · llm (in-band) engine · 10s · about this reviewer

Maintainer commands

@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes operating-system autostart registrations profile-aware and preserves the selected named profile in the login command.

  • Uses distinct Linux desktop files, macOS LaunchAgents, and Windows Run values for each profile.
  • Keeps the Windows installer shortcut exclusive to the default profile.
  • Records first-run autostart completion per profile, fully addressing the previous finding.
  • Adds cross-platform profile-isolation tests and documents the behavior.

Confidence Score: 5/5

The PR appears safe to merge; the previously reported shared-marker problem is fully fixed and no new actionable issues were identified.

Each profile now receives a unique, validated first-run marker, while failed enablement still leaves no marker and therefore retries later. The reverse-order test confirms that a named-profile marker cannot suppress default-profile registration. The previous thread was also manually resolved after the fix.

Important Files Changed

Filename Overview
aw_qt/autostart.py Adds profile-aware commands and isolated platform registrations, including a per-profile first-run completion marker.
tests/test_autostart.py Covers profile-specific registrations, installer-shortcut isolation, command propagation, and both marker-order scenarios.
README.md Documents that Start at login preserves the active named profile.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Active aw-qt profile] --> B{Default profile?}
    B -- Yes --> C[Use legacy unsuffixed registration]
    B -- No --> D[Append validated profile suffix]
    D --> E[Include --profile NAME in login command]
    C --> F[Platform autostart backend]
    E --> F
    F --> G[Linux desktop entry]
    F --> H[macOS LaunchAgent]
    F --> I[Windows Run value]
    A --> J[Profile-specific first-run marker]
Loading

Reviews (2): Last reviewed commit: "test(autostart): cover reverse sequentia..." | Re-trigger Greptile

Comment thread aw_qt/autostart.py
A named-profile marker must not skip default-profile first-run enablement.
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

@greptileai review

@ErikBjare
ErikBjare merged commit a4072df into ActivityWatch:master Sep 8, 2026
4 checks passed
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.

2 participants