add web ui guide - #609
Closed
Zer02811 wants to merge 7 commits into
Closed
add web ui guide#609Zer02811 wants to merge 7 commits into
Zer02811 wants to merge 7 commits into
Conversation
Adds a dependency-free dashboard (public/) served by the existing node:http control API, plus the backend it needs: - account list sourced from .env (scripts/api/envAccounts.js) instead of a hand-maintained copy, so the UI cannot drift from the real accounts - per-account login status derived from the session store's stored cookies (scripts/api/sessionStore.js), so the UI can show which accounts still hold a live Microsoft auth cookie - task scheduling: taskScheduler.js persists tasks to scheduled_tasks.json, taskRunner.js polls and starts them one at a time, and both are wired into server.js behind API_ALLOW_SCHEDULE_WRITE - live log streaming over SSE so the dashboard console mirrors the run logParser: treat ExperimentalWarning as a warning rather than an error. Node prints it on stderr for the SQLite session store, and the old /\bWARN/ pattern missed it, so every run opened with a red herring. scheduled_tasks.json is gitignored: it is per-machine run state, not project config. eslint gains a browser-globals block for public/**. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A Stop from the dashboard previously just killed the process tree, which left Chromium instances to be reaped by the OS and could orphan them. - src/util/Abort.ts: run-wide AbortController plus a registry of live browsers, so an abort can force-close every Chromium it knows about. - Browser.ts registers each launched browser and unregisters on disconnect. - index.ts: SIGINT/SIGTERM now abort first (closing browsers) before flushing webhooks and exiting; the between-accounts delay and the 30-minute Edge browsing task are both interruptible, and the account loop stops rather than starting a fresh login. - processManager.js: writes an __ABORT__ sentinel to the child's stdin because Windows cannot deliver a real SIGTERM to a child process; the existing kill timer still escalates to a tree kill if the bot does not exit in time. Covered by tests/abort.test.mjs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Toggling Visual Search or 30-Minute Edge Browsing in the Web UI had no effect. The env vars reached the spawned bot correctly, but nothing in the child ever consumed them: applyEnvOverrides() was only called by the Docker entrypoint and the CLI, so loadConfig() read config.json verbatim and both flags stayed false. Add mergeEnvOverrides(), which applies the overrides to an already-parsed config object in memory, and call it from loadConfig() before validateConfig() - so overridden values pass the same schema checks as file values, and config.json is never rewritten. applyEnvOverrides() now preflights and delegates to the same merge, keeping Docker behaviour. Also widen boolean parsing to the shell-style words Load.ts already accepts (1/0, yes/no, on/off, case-insensitive) instead of only true/false, tolerate partial failure so one bad value no longer discards valid overrides, and mask secret values (webhook URLs, bot tokens) in the applied-override log. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…te task The background Edge browsing activity only posted progress reports to the rewards API; no browser tab was actually browsing. EdgeLiveBrowsing opens a tab in the already-authenticated context and reads for the full session window: scrolls with human-shaped pauses, dwells at the end of an article, and occasionally follows a link instead of jumping back to a feed. Links are restricted to the current host or a bing/microsoft/msn/microsoftedge suffix so a session cannot wander onto arbitrary sites. The session honours the run's AbortSignal at every wait, so a Stop unwinds it instead of hanging, and failures are logged as a warning rather than failing the whole activity. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Web dashboard for the control API, graceful Stop, and reliable CONFIG_* overrides
A-Z walkthrough for users with no coding experience: prerequisites, Node.js setup, starting the dashboard, and using every UI section (accounts, manual login, toggles, running, scheduling, live logs). Documents the non-obvious defaults: API_ALLOW_SCHEDULE_WRITE is off so Schedule Run fails until enabled, Remove only hides an account locally, and Add Account never takes a password. Vietnamese version keeps UI labels, commands, and error strings in English so they match the on-screen text. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs: add beginner Web UI guide (English + Vietnamese)
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.
No description provided.