feat: add configurable ActivityWatch server URL and Basic Auth#225
feat: add configurable ActivityWatch server URL and Basic Auth#225liv10let wants to merge 1 commit into
Conversation
Greptile SummaryThis PR is a fork-customisation layer for
Confidence Score: 2/5Not safe to merge: the central feature described in the PR is absent from the diff, and the Firefox manifest change would leave custom-server requests silently blocked even if the feature were added later. The PR's stated purpose — runtime-configurable server URL and Basic Auth — does not appear in any changed file. The settings page has no new inputs, the client ignores any stored URL, and there is no auth-header injection anywhere. On top of that, the Firefox manifest only whitelists two localhost origins; any custom server a user might configure would be refused by the browser. Both gaps would result in the advertised feature simply not working for Firefox users. src/manifest.json needs wildcard host permissions for Firefox to support the described custom-server feature. The banner asset at public/media/banners/banner.png should be replaced with an actual banner-dimensioned image rather than a copy of the logo. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens Settings] --> B{Server URL field?}
B -- "Claimed in PR desc" --> C[Enter custom URL + credentials]
B -- "Actual code state" --> D[Only Browser & Hostname fields]
C --> E[Save to localStorage]
E --> F[getClient uses runtime URL + Basic Auth]
D --> G[getClient uses AWClient default URL]
G --> H{Firefox?}
H -- Yes --> I[Only 127.0.0.1:5600 & 5666 allowed]
H -- No --> J[all_urls host permission — OK]
I --> K[Custom URL request blocked by browser]
J --> L[Request succeeds]
|
| "{{firefox}}.browser_specific_settings": { | ||
| "gecko": { | ||
| "id": "{ef87d84c-2127-493f-b952-5b4e744245bc}" | ||
| "id": "aw-watcher-web-configurable@local", | ||
| "data_collection_permissions": { | ||
| "required": ["browsingActivity"] | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Core features described in the PR are not present in the diff
The PR description promises settings-page fields for Server URL, Username, and Password; Basic Auth header injection; and syncing the popup's webUI link with the configured server. None of these appear in this diff. Examining the current source: settings/index.html has no URL/auth inputs, settings/main.ts saves only browser name and hostname, and client.ts creates AWClient with no configurable base URL or auth headers. As submitted, the PR only changes the Firefox extension ID, adds data_collection_permissions, a Chinese README, and image assets — the central advertised functionality is missing entirely.
| "{{firefox}}.browser_specific_settings": { | ||
| "gecko": { | ||
| "id": "{ef87d84c-2127-493f-b952-5b4e744245bc}" | ||
| "id": "aw-watcher-web-configurable@local", |
There was a problem hiding this comment.
Extension ID uses an informal
@local domain
AMO (addons.mozilla.org) extension IDs are expected to follow an email-address style format with a real domain (e.g. aw-watcher-web-configurable@activitywatch.net). The @local suffix is informal and may cause friction during AMO review. It also means any end-user who installs this from AMO alongside the upstream extension will have two entries with no naming collision guard, since the ID no longer matches the upstream {ef87d84c-…} UUID.
Summary
Add runtime-configurable ActivityWatch server URL and HTTP Basic Auth support, so users can point the extension at a custom server (including servers behind nginx reverse proxy with
auth_basic) without rebuilding.Changes
Usage
http://your-server:5601)