AlphaClaw macOS Compatibility, building on pr-4-macos - #63
Open
diazMelgarejo wants to merge 456 commits into
Open
AlphaClaw macOS Compatibility, building on pr-4-macos#63diazMelgarejo wants to merge 456 commits into
diazMelgarejo wants to merge 456 commits into
Conversation
fix: isolate onboarding auth from stale env vars
Let users continue to the dashboard when channel pairing is blocked or deferred, so setup does not get stuck waiting on a pairing request.
…ns and richer tool guidance. This adds URL-sticky tools tab behavior, robust tools config persistence/reset handling, and contextual tooltips so advanced capabilities are easier to understand.
Introduces the cron tab with a resizable job list sidebar, job detail view (metadata, prompt editor, usage stats, run history), and an overview page with optimization warnings. Includes server-side cron service, API routes, usage DB support, and tests. Fixes missing formatLocaleDateTimeWithTodayTime import in job detail and clears stale run entries on job switch.
Adds full Slack channel support across AlphaClaw — onboarding wizard, channel dashboard, pairings, gateway sync, watchdog notifications, and the channel creation modal. Slack uses Socket Mode which requires two tokens (Bot Token + App Token) rather than one. This is handled via a new `extraEnvKeys` property on channel definitions and dual-token logic in the gateway sync and onboarding flows. Changes: - Add Slack to channel definitions, env keys, and known vars - Add Slack Bot Token and App Token fields to onboarding wizard - Wire Slack into openclaw.json generation (fresh + import flows) - Handle dual-token channel sync in gateway (--bot-token / --app-token) - Use Object.keys(kChannelDefs) instead of hardcoded channel arrays - Add Slack to channel dashboard, pairings UI, and pairing routes - Add App Token field to create-channel modal (Slack is single-account) - Add watchdog crash notifications via Slack DM - Add slack-api.js (minimal Web API wrapper matching existing patterns) - Add Slack SVG icon - Update agents-service test for Slack channel account Ref: chrysb#8 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces a rolling cron schedule calendar with usage-aware tiers, status-aware tooltips, job navigation, and repeating-job grouping, plus bulk cron usage/runs endpoints to power the view efficiently. Also adds vertical resizing with persisted heights for cron prompt and watchdog logs, and refines calendar layout/behavior for performance and usability.
This update reduces cognitive load in the all-jobs experience while adding richer scheduling, warning, and run-trend interactions that map directly into run history filtering.
This switches pricing resolution to a stable map-first flow with node_modules fallback, updates usage/cron consumers to reuse the shared resolver, and trims redundant trend subtitle text in the cron overview UI.
Count distinct run ids in usage aggregation so average tokens/cost per run are computed against real cron runs, and refresh trend visuals with brighter neon segment styling.
Use slot-aware run details for past entries, 7-day projected averages for upcoming entries, and drive token intensity colors from actual/predicted per-slot usage to match calendar context.
This updates cron run metadata presentation, swaps and spaces key actions, moves usage range controls to SegmentedControl, and removes unsupported --json flags from cron enable/disable/edit commands while adding focused coverage.
This consolidates run history rendering into a shared component, simplifies delivery/session routing controls, and aligns cron command usage with current CLI support while keeping save behavior consistent through a single Save changes action.
Use latest-run heartbeat/status context to avoid false not-delivered warnings while preserving actionable cron optimization alerts.
Close Slack channel setup gaps by persisting app tokens in edit/manage flows, hiding managed Slack tokens from Envars, and enforcing single-account rules consistently in UI and server logic. Align channel add UX across views by reusing one add-menu codepath and tighten setup guidance copy.
feat: add Slack as a first-class channel
feat: add cron dashboard tab
fix: add skip option on onboarding pairing step
Make the onboarding Channels group easier to scan by grouping Telegram, Discord, and Slack into logo-backed accordion sections with a shared caret affordance and default-expanded Telegram details.
Center the cron layout, replace the persistent job sidebar with a selector, add trend/insight improvements, and split cron detail into focused components while sharing editor line-sync behavior with the file viewer for consistent wrapped-line numbering.
Capture the rest of the current working tree changes so the beta release reflects all in-progress updates in this branch.
Introduce a reusable PaneShell component and ac-fixed-header-pane CSS for pages that need a pinned header with a separately scrollable body. Apply the pattern to envars, models, and agents tabs so save/cancel actions stay visible while content scrolls. Other changes in this batch: - Add PopActions (animated save/cancel) to envars and models headers - Fix models isDirty state not clearing when auth tokens are reverted - Add agent overview tools card with profile summary and navigation - Move watchdog to bottom of monitoring sidebar section - Reserve PopActions height with visibility:hidden to prevent layout shift
Author
No open test gaps remain from the original checklist.a05cbe9 — fix: return contractstartManagedScheduler() sets kSchedulerState.active synchronously, so the re-read sees the correct runtime state immediately. getSystemCronStatus was already imported; one import line added for it. 7641a7f — test: Linux install pathCalls installHourlyGitSyncCron() with platform: "linux", then asserts kSystemCronPath exists in the memory-fs, contains the default schedule string, and getSystemCronStatus() returns { installed: true, installMethod: "system_cron" }. a7bd4b2 — test: darwin disable → re-enableThree phases against the same memory-fs:
4cba0d8 — test: return value semanticsAsserts result === getSystemCronStatus().installed for both darwin and linux. If the broadened installed || (darwin && enabled) expression ever comes back, these tests break as soon as enabled is true but installed is still false. |
…se (chrysb#68) Templates that omit a direct openclaw pin should still resolve OpenClaw from the same AlphaClaw version the template pins. This change reuses the template-pinned version when reading registry metadata and adds a regression for the mismatch case. Constraint: Managed templates now intentionally pin only @chrysb/alphaclaw Rejected: Continue resolving dist-tags.latest for template fallbacks | mixes template-pinned AlphaClaw with unrelated OpenClaw metadata Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep template fallback metadata tied to the same pinned AlphaClaw version unless template semantics change again Tested: node --check lib/server/alphaclaw-version.js; node --check tests/server/alphaclaw-version.test.js; direct mocked fetch validation for fallback/latest/direct-pin cases Not-tested: Full Vitest run in this local environment (Vite/esbuild spawn error -88 during config startup)
Add WhatsApp channel support and QR login flow parity
Owner
|
Thank you! I will inspect this over the weekend. |
diazMelgarejo
force-pushed
the
pr-4-macos
branch
from
April 18, 2026 13:49
2f5b3b3 to
4cba0d8
Compare
…guards Absorbs upstream commits 0b92623→f98d4c0 (v0.9.5–v0.9.9): - gogcli HOME compat: HOME/OPENCLAW_HOME now set to kRootDir in gatewayEnv and onboard shellCmd env (commits 9dcd41e, 396bd78) - SQLite handle-close fix: explicit close() in db module tests to fix WAL-lock flakiness — the root-cause fix that replaced our singleFork PR (commit f98d4c0) - Package updates: openclaw patch refresh, package-lock bump Conflict resolution: - lib/server/gateway.js: accepted HOME/kRootDir addition; added kRootDir to constants import - lib/server/onboarding/index.js: accepted HOME/kRootDir addition; added kRootDir to constants import; all 16 !validatedReadOnlyMode guard sites preserved — upstream's removal of read-only logic was NOT accepted Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After upstream commit 9dcd41e (gogcli HOME compat), gatewayEnv() and the onboard shellCmd env now set HOME=kRootDir and OPENCLAW_HOME=kRootDir, with OPENCLAW_STATE_DIR carrying the old OPENCLAW_DIR value. Update two tests that still expected the pre-refactor layout: - gateway.test.js: add HOME/OPENCLAW_STATE_DIR to launch env assertion - routes-onboarding.test.js: switch toEqual→toMatchObject, replace OPENCLAW_HOME with HOME+OPENCLAW_STATE_DIR expectations All 575 tests and 29 watchdog tests now pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rkers
Root cause (two layers):
1. routes-browse.test.js + routes-models.test.js called mkdtempSync per test
but never cleaned up. 30+ leaked dirs/run add I/O overhead on macOS
/var/folders/ (memory-mapped filesystem).
2. db-layer parallel workers (doctor, watchdog, webhooks) leave DatabaseSync
.db-shm pages mmap'd. Under 60+ workers on ARM64, OS memory pressure slows
ALL workers — including pure-mock routes tests — past the 5s timeout.
Fix:
- routes-browse.test.js: track created dirs in createdTestRoots[]; afterEach
splices and rmSync({recursive,force}) each entry
- routes-models.test.js: same pattern for createApp() temp dirs (createdTempRoots)
- vitest.config.js: testTimeout 5000 → 10000ms; gives pure-mock workers breathing
room while db-layer .db-shm pressure fix propagates (doctor/watchdog/webhooks-db
still need afterEach closeXyzDb() — tracked as remaining upstream work)
Verified: npm run test:coverage passes 594/594 sequentially.
Target: npm test 594/594 (was 584/594 before this fix).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
E.1 — package.json: add @esbuild/darwin-arm64 + @esbuild/darwin-x64 0.25.x as
optionalDependencies so ARM64 Macs pick up the correct native binary without
requiring manual postinstall.
E.2 — bin/alphaclaw.js: print darwin-specific npm prefix advisory on `alphaclaw start`
(guides users to set prefix=$HOME/.local to avoid sudo-required installs).
E.3 — bin/alphaclaw.js + lib/scripts/macos-hourly-sync.plist.template: on darwin,
write a LaunchAgent plist to ~/Library/LaunchAgents/ instead of /etc/cron.d
(which requires root and does not exist on macOS).
E.5 — .github/workflows/ci.yml: extend CI matrix to include macos-latest alongside
ubuntu-latest; add watchdog suite and coverage steps so macOS-specific failures
are caught before merge.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cursor
Bot
force-pushed
the
pr-4-macos
branch
2 times, most recently
from
August 8, 2026 00:32
b0857bc to
d9a56d8
Compare
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.
Summary
getBinPath()intolib/platform.js— darwin routes to~/.local/bin(user-writable, no sudo), Linux keeps/usr/local/binwith managed fallback.readOnlyModeflow attaches AlphaClaw to an existing local OpenClaw setup without modifying any config files, writing git state, or touching the gateway proxy config.sanitizeOpenclawConfig: Ensures every provider inopenclaw.jsonhasmodels: [], preventing the OpenClaw gateway JSON-schema crash that causes a 30s startup timeout./api/events/status,buildStatusPayload()refactor, and bundler-style frontend imports while keeping the read-only onboarding invariants.getSystemCronStatusmissing deps arg, duplicateensureGatewayProxyConfigoutside read-only guard,ensureManagedExecDefaultsmodifying config in read-only mode, andapi.test.jsbody expectation missingreadOnlyMode.Test plan
npx vitest rungetBinPath()unit tests: 4 passingsanitizeOpenclawConfig()unit tests: 7 passingopenclaw.jsonalphaclaw startinstalls binary to~/.local/binwithout sudo{ readOnlyMode: true }to/api/onboardcompletes without rewriting existing configBranch
pr-4-macos(pushed fromdiazMelgarejo/AlphaClaw)Full suite: 535 passed, 3 failures (after merging main to pr-4-macos)
Fixed: post main -> pr-4-macos
All 3 failures were merge conflict residue — the fixes preserve the correct invariant that read-only onboarding must not write to
openclaw.jsonor callensureGatewayProxyConfig.