Skip to content

Add multi-account support / Rework UI - #22

Merged
safarsin merged 8 commits into
safarsin:mainfrom
JeromeM:multi_account
Apr 27, 2026
Merged

Add multi-account support / Rework UI#22
safarsin merged 8 commits into
safarsin:mainfrom
JeromeM:multi_account

Conversation

@JeromeM

@JeromeM JeromeM commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

I've added multi-account support (with scheduler available for each account).

Also reworked the UI to be more "user friendly"

image

@safarsin safarsin added enhancement New feature or request new UI labels Apr 18, 2026
@safarsin

Copy link
Copy Markdown
Owner

Hi,
I'm currently finalizing the v3.1 release, which already includes my own scheduler and auto-start implementation that I'm testing right now. Because your changes are so massive, I'll need more time to review everything and figure out how to merge our overlapping features

I'll definitely review this in detail after v3.1 is released. Thank you for the work and the new UI looks nice

@JeromeM

JeromeM commented Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

Hey,
Let me know if you want me to adapt what I've done to v3.1 when you'll release it !
It'll be less work for you.

@safarsin

Copy link
Copy Markdown
Owner

That would be incredibly helpful, thank you.
I'll definitely ping you as soon as v3.1 is out

@JeromeM

JeromeM commented Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

Glad to help, it's a really great application you have done !
It's helping me a lot with my rewards points :)

JeromeM added 4 commits April 20, 2026 20:16
- Adopt main's headless CLI runner (AutoRewarder_CLI.py) and OS autostart
  (HKCU Run on Windows, .desktop on Linux), dropping the in-process daemon
  scheduler and the standalone windows_startup module.
- Per-account schedule schema: advancedScheduling, runDuration,
  queriesPerHour, queries_pc, queries_mobile. Legacy keys
  (time/window_hours/queries) are ignored on read.
- Settings modal: accordion schedule cards (one expanded at a time) with
  live inline summary; advancedScheduling sub-toggle gates the duration
  and rate fields.
- settings_manager: atomic write retries on transient Windows
  PermissionError; read paths tolerate recovery-write failures.
- Bump CURRENT_VERSION to v3.1 and the brand sub-header to match.

Keeps multi-account architecture, redesigned UI, PC/Mobile run split
and per-account schedules from multi_account.
Comment thread GUI/history.html

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds multi-account support across the app (separate Edge profiles + per-account history/status/schedule) and ships a full GUI redesign to manage accounts and schedules more easily.

Changes:

  • Introduces multi-account data layout and account CRUD/migration (AccountManager, per-account meta.json + schedule).
  • Refactors core automation wiring to rebuild driver/history/daily-set context per selected account, and updates the headless runner to execute per-account schedules.
  • Reworks the GUI into a card-based UI with account picker, account management modal, settings/schedule modal, and updated history window.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/settings_manager.py Splits global settings vs per-account meta/schedule, adds safer JSON read/write helpers.
src/config.py Defines multi-account storage layout and per-account path helpers.
src/account_manager.py Adds account index + CRUD + legacy single-account migration.
src/api.py Makes the backend multi-account aware; adds schedule endpoints, account switching, and setup flow updates.
src/driver_manager.py Binds WebDriver to a per-account profile directory; adds mobile UA support and identity-disabling flags.
src/history.py Scopes history manager to a per-account history path and ensures directory creation.
src/daily_set.py Scopes daily-set status tracking to a per-account status path and ensures directory creation.
src/edge_policy.py Adds Windows-only registry policy helper to temporarily disable Edge browser sign-in during setup.
AutoRewarder_CLI.py Updates headless runner to iterate per-account schedules with optional targeting/overrides.
AutoRewarder.py Adjusts entrypoint to delegate --headless runs and updates GUI window sizing/theme.
GUI/index.html New UI layout (account picker, run card, activity feed, modals, empty state).
GUI/styles.css Large UI refresh with a new design system and modal/dropdown styling.
GUI/script.js Implements new UI logic (toasts, modals, account dropdown, scheduling UI, loader).
GUI/settings.js Implements accounts management modal behaviors (rename, setup, delete, add).
GUI/settings.css Deprecates old settings stylesheet in favor of consolidated styles.css.
GUI/history.html Updates history window styling and adds current-account context pill.
Comments suppressed due to low confidence (1)

src/history.py:56

  • get_history() tries to remove/replace backup files without guarding against OSError (e.g., file locked by AV or another process). os.remove(backup_path) / os.replace(...) can raise and break history reads, which should be resilient. Wrap these operations in try/except OSError (similar to the JSON recovery logic in settings_manager).
            backup_path = self.history_file + ".backup"

            if os.path.exists(backup_path):
                os.remove(backup_path)

            os.replace(self.history_file, backup_path)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread GUI/script.js Outdated
Comment thread GUI/history.html Outdated
Comment thread src/api.py Outdated
Comment thread AutoRewarder_CLI.py Outdated
@safarsin

safarsin commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Hi @JeromeM, the mobile collection feature and the new settings UI look awesome.

I have one technical question: since microsoft tracks touch data on mobile to detect automation, does your implementation simulate touch events to bypass this, or does it still send mouse events? We need to be careful not to trigger their anti-bot systems.

Also, one small UI request: could you bring back the green/red color coding for the history log? It makes it much easier to track successes and errors at a glance.

Lastly, looking at the diff, this is a huge update. Because the changes are so extensive, it’s going to take me a bit more time to properly review and test everything on my end.

I can really see the experience behind this code. It’s awesome to have such skilled developers contributing to the project. Thanks. 🤝

@JeromeM

JeromeM commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator Author

Thank you for your comment.
I'm actually unavailable for 2 days for my job. I will take a look at the PR comments from Copilot.

I will also bring back the color coding for the history.

For the touch events, I will take a look to make something more careful for the MS detection system.

I'm going back to you as soon as I'm home on thursday.

Oh and btw, sorry if my english is not so good, I'm from France :)

@safarsin

Copy link
Copy Markdown
Owner

Sounds good. Take your time, there's absolutely no rush.

And don't worry about your English is absolutely fine. I'm not a native either, I'm from Prague.

JeromeM added 3 commits April 23, 2026 12:31
…o 100 search for 100 points.

With the scheduler activated, we can't do this daily task with the 99 limit.

Update all events on mobile from mouse events to touch events to avoid MS detection.
@JeromeM

JeromeM commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator Author

Hey,

I've tried fo fix everything !

Now every mobile related moves are touch events to avoid MS detection.
Colors are back in history, as well as the dedicated CSS file.
The Copilot suggestions are also applied.

Let me know if there is anything else I need to review / refactor, or even do differently !

Have a nice day.

@safarsin

Copy link
Copy Markdown
Owner

Awesome, thank you for your work.

I’m going to pull the branch, do some thorough testing on my end, and dive into the code. I'll ping you if I have any questions comes up.

Thanks again for the hard work. Have a great weekend.

@safarsin

Copy link
Copy Markdown
Owner

Hi @JeromeM,

So far, I've tested the UI and it's awesome. Honestly, feels like a masterclass.

However, while doing some manual testing, I caught a small bug. When I try to add more than 2 accounts, the scheduled runs in the Settings modal render like this:

image image image

The Scheduled-runs section broke once 3+ accounts were added: the
inner schedule-accounts-list (max-height 360px, flex column) was
shrinking every card to fit, chopping headers in half and clipping
the inputs of the expanded card. Worse, removing that inner cap
made the modal itself grow past the window — the Save / Cancel
buttons fell offscreen.

Fix the layout in two layers:

- Cap modal-box at max-height: 90vh and turn it into a flex column.
  Header and footer get flex-shrink: 0 so they stay pinned; modal-body
  takes the remaining space with overflow-y: auto and min-height: 0.
  Save / Cancel are always reachable, no matter how many accounts.

- Drop the schedule-accounts-list inner max-height + overflow. The
  modal-body now handles scroll, eliminating the nested-scroll setup
  that was squeezing cards.

Also scroll the freshly-expanded card into view (block: 'nearest',
240 ms after click so the max-height transition has settled) so
opening a card lower in the list doesn't leave its form clipped
below the visible area.
@JeromeM

JeromeM commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator Author

Hello,

My bad, I didn't test with more than 3 accounts..
It's now fixed. Let me know if you find anything else !

@JeromeM

JeromeM commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator Author
image

@safarsin

Copy link
Copy Markdown
Owner

Hi @JeromeM,

I've reviewed and tested the code, and everything looks great. I'll go ahead and merge it, add a banner block, update the docs, and release it as v3.2.

Thank you again for the amazing work. I really appreciate it! 🤝

@safarsin
safarsin merged commit 02d14c1 into safarsin:main Apr 27, 2026
@JeromeM

JeromeM commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator Author

My pleasure, thank you !

@safarsin safarsin linked an issue Apr 27, 2026 that may be closed by this pull request
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AutoRewarder v3.2

3 participants