Skip to content

add web ui guide - #609

Closed
Zer02811 wants to merge 7 commits into
TheNetsky:v4from
Zer02811:v4
Closed

Zer02811 wants to merge 7 commits into
TheNetsky:v4from
Zer02811:v4

Conversation

@Zer02811

Copy link
Copy Markdown

No description provided.

Zer02811 and others added 7 commits September 13, 2026 18:56
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)
@TheNetsky TheNetsky closed this Sep 14, 2026
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