Commit Graph

66965 Commits

Author SHA1 Message Date
Vincent Koc
4969c44226 refactor(deadcode): localize browser plugin declarations (#101898) 2026-07-07 15:47:05 -07:00
Vincent Koc
9dbb1ed3d2 refactor(deadcode): localize control ui declarations (#101894) 2026-07-07 15:34:09 -07:00
Vincent Koc
ba7af36306 refactor(deadcode): localize script constants (#101892) 2026-07-07 15:17:41 -07:00
Ayaan Zaidi
e3b43a0001 perf(slack): bound thread history pagination 2026-07-08 03:40:37 +05:30
Ayaan Zaidi
1993ead6f5 perf(slack): drop process-wide write client concurrency cap 2026-07-08 03:40:37 +05:30
Ayaan Zaidi
04b55c35d2 perf(slack): parallelize independent inbound prepare lookups 2026-07-08 03:40:37 +05:30
Vishal Dharmadhikari
d708df47a3 improve(google): identify OpenClaw Gemini API traffic (#101834) 2026-07-07 16:09:02 -06:00
Vincent Koc
e7365d41d3 refactor(deadcode): localize Parallels helpers (#101889) 2026-07-07 14:53:20 -07:00
Bryan Tegomoh, MD, MPH
3d442153f6 fix(agents): avoid false unscheduled note after shell cron add (#101807)
* fix(agents): count shell cron reminder adds

* fix(agents): narrow shell cron reminder tracking

* fix(agents): handle shell runner variants

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-07 14:45:10 -07:00
Vincent Koc
1b6f3e43d1 refactor(deadcode): trim private helper exports (#101886) 2026-07-07 14:43:45 -07:00
Omar Shahine
91a0ebbce6 Improve iMessage imsg setup and skill ownership (#101407)
Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
2026-07-07 14:13:37 -07:00
Vincent Koc
d563101a82 refactor(deadcode): localize test and tooling helpers (#101875) 2026-07-07 13:45:26 -07:00
Vincent Koc
f565138ddc refactor(deadcode): localize core helpers (#101869) 2026-07-07 13:16:57 -07:00
joshavant
75e3aa293a fix(qa): use valid Convex module filename 2026-07-07 15:04:53 -05:00
joshavant
39a5bb89eb chore(qa): update Convex to 1.36.0 2026-07-07 15:04:53 -05:00
Josh Avant
6438c89f05 fix(mobile): clarify gateway connection security setup (#101325)
* fix(mobile): clarify gateway connection setup

* chore(i18n): sync native mobile strings

* fix(mobile): align manual gateway previews

* chore(i18n): refresh native source inventory

* chore(android): remove unused connect tab strings

* test(i18n): drop removed connect tab sentinel

* fix(ios): brand connection security picker labels

* fix(mobile): hide gateway endpoint previews

* chore(i18n): sync native source inventory

* fix(mobile): remove redundant TLS helper copy
2026-07-07 14:43:11 -05:00
Vincent Koc
e242c61400 refactor(deadcode): localize extension helpers (#101860) 2026-07-07 12:12:32 -07:00
Vincent Koc
7ff3f2dbf9 refactor(deadcode): localize UI and script symbols (#101858) 2026-07-07 11:55:57 -07:00
NianJiu
dbbab1044e fix: require full frontmatter delimiter lines (#101795)
Co-authored-by: NianJiuZst <180004567+NianJiuZst@users.noreply.github.com>
2026-07-07 11:53:03 -07:00
Peter Steinberger
6235344006 fix(ui): stop flashing the login gate on dashboard load when credentials are stored (#101849)
First connects backed by stored auth (URL/session token, password, or an
approved device token) now paint a small wiggling OpenClaw mark (delayed
fade-in, reduced-motion aware) until the hello resolves. The login gate
still owns credential-less first opens, rejected credentials, and manual
gate submissions.

Closes #101847
2026-07-07 19:40:30 +01:00
Gio Della-Libera
41425bf094 policy: repair denied gateway http endpoints (#99731)
* policy: repair denied gateway http endpoints

* docs(policy): describe gateway http repairs

---------

Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
2026-07-07 11:26:54 -07:00
Peter Steinberger
dd228d5f3c improve(ui): restyle connection-lost pill as neutral status surface (#101844) 2026-07-07 19:20:31 +01:00
Peter Steinberger
41cae5c8cf fix(ui): refresh raw-copy baseline 2026-07-07 14:19:07 -04:00
Peter Steinberger
6683a8635e improve(ui): soften idle voice button ring in the chat composer (#101843)
The idle Talk mic button used a full-strength accent ring that visually
competed with the recording (stop) state. Mute the idle ring to 40%
accent and ramp hover to 70% so idle -> hover -> recording escalates.

Formatting proof: oxfmt --check clean on ui/src/styles/chat/layout.css
on Testbox tbx_01kwyvx4pbdmb3yhjff6gvzvny (worktree has no node_modules,
so the format hook cannot run).
2026-07-07 19:15:39 +01:00
Peter Steinberger
a6768d9de5 feat(cron): event triggers — polled condition-watcher scripts via code mode (#101195)
* feat(cron): add headless code-mode driver and trigger-script evaluator

Part A of cron event triggers: runCodeModeScriptHeadless runs a script
to completion (exec/settle/resume, no snapshots, no session), plus the
cron-facing evaluator with per-job tool catalog cache, semaphore, 16KB
state cap, and closed failure taxonomy.

* fix(cron): correct trigger-script bootstrap flags and cache narrowing

* feat(cron): add event triggers (polled condition-watcher scripts)

Part B: trigger field on cron jobs gated by cron.triggers.enabled;
timer evaluates the script each due tick, quiet ticks leave no run
history, fired runs append the script message to the payload; once
semantics, min-interval floor, SQLite columns, RPC/CLI/agent-tool
surfaces, and docs.

* fix(cron): propagate triggerEval through startup catch-up outcomes

* fix(cron): honor cron staggering on quiet trigger ticks; fix trigger test types

* fix(cron): reject with Error reason in trigger-script abort test

* fix(cron): regenerate protocol/docs/snapshot artifacts and break madge cycle for trigger types

CI fixes for #101195: trigger evaluator result types move to the cron
types leaf (madge cycle), cron tool schema inventory gains trigger,
Swift protocol bindings + docs map + Linux prompt snapshots regenerated.

* fix(cron): drop underscore-dangle names in trigger code sync assert

* fix(cron): adopt registerHeadlessToolSearchCatalog after tool-search symbol localization

Upstream #101831 made registerToolSearchCatalog module-private; fold the
headless ref-only catalog registration into one public seam.
2026-07-07 19:12:38 +01:00
Peter Steinberger
525f58e9c3 test(ui): run responsive browser cases concurrently 2026-07-07 14:09:01 -04:00
Peter Steinberger
21f251220f feat(ui): redesign gateway connection-lost banner as floating pill (#101812) 2026-07-07 19:00:29 +01:00
Peter Steinberger
3d53ed7ed8 fix(android): keep cold-start gateway auto-connect from overriding explicit intents (#101799)
* fix(android): keep cold-start gateway auto-connect from overriding explicit intents

NodeRuntime's init-time auto-connect now atomically claims the first gateway
lifecycle intent (CAS 0->1) and stands down permanently when any explicit
connect/disconnect/switch intent already exists, so a late discovery emission
can no longer override a user decision. This was also the root cause of the
CI-only flakes in GatewayBootstrapAuthTest (refreshGatewayConnection_* at
:616/:627 and switchToUndiscoveredGateway* on PRs #101002/#101387/#101396).

GatewaySession.Connection.sendRequestFrame now starts its response watcher
with CoroutineStart.ATOMIC: disconnect teardown cancels connectionJob right
after failPending(), and a DEFAULT-start watcher still queued for dispatch was
cancelled without running, silently dropping the terminal UNAVAILABLE onError
owed to fire-and-forget callers (root cause of the flaky
GatewaySessionInvokeTest.disconnectReportsUnknownOutcomeForFireAndForgetRpc).

Tests neutralize runtime background work (cancel+join the runtime scope)
before arming the registry and scripting lifecycle steps, and add regression
coverage for the auto-connect intent claim.

Proof: refresh flake reproduced at iteration 1 under taskset -c 0,1 on a
Blacksmith Linux box; post-fix 3 pinned stress rounds (120/150 looped
iterations) plus full :app:testPlayDebugUnitTest (109 classes, 0 failures)
and :app:ktlintCheck green on the same box.

* chore(i18n): resync native inventory line positions after NodeRuntime edits
2026-07-07 18:51:46 +01:00
Peter Steinberger
b5f67ac4c7 fix(shared): skip app-group identity migration when OPENCLAW_STATE_DIR is overridden (#101779)
* fix(shared): skip app-group identity migration when OPENCLAW_STATE_DIR is overridden

An unentitled process (mac app, swift test runners) with a fresh state dir
imported the machine's real app-group device identity and auth tokens into
any explicitly overridden state dir, violating the documented legacy-fallback
contract. On developer Macs this leaked real operator/node device tokens into
per-test temp state dirs, breaking the nil-token expectations in
GatewayNodeSessionTests (non bootstrap hello / untrusted bootstrap hello)
for local swift test runs while clean CI passed.

Migration now requires no OPENCLAW_STATE_DIR override, with a regression
test. StateDirectoryIsolationTrait owns per-test state-dir pinning (fresh
temp dir per gated test, env restored to launch value or a run-scoped
quarantine dir, never unset), replacing the hand-rolled setenv/defer
boilerplate in every gated test.

* test(shared): remove redundant throws annotations
2026-07-07 18:48:21 +01:00
zw-xysk
e5c224754c fix(gateway): bound all-agent usage cache concurrency (#101589)
* fix(gateway): bound all-agent usage.cost concurrency to prevent SQLite starvation

Replace raw Promise.all in loadAllAgentCostUsageSummary with
runTasksWithConcurrency (limit=12), matching the sibling sessions.usage
pattern. Unbounded concurrent usage-cost cache reads saturated the SQLite
connection pool for deployments with 100+ agents, causing SQLITE_BUSY
timeouts or gateway memory crashes.

Fixes #101552

* fix(gateway): share usage cache concurrency cap

---------

Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com>
2026-07-07 10:48:02 -07:00
Josh Lehman
a68caa185b refactor(sessions): move parent-session forking behind the accessor boundary (#101699)
* refactor(sessions): move parent-session forking behind the accessor boundary

* fix(sessions): lazy-load fork transcript runtime to keep accessor imports lean

* test(sessions): align parent fork mock shape
2026-07-07 10:47:02 -07:00
Shakker
53d0c4ca50 docs: update file preview changelog (#101319) 2026-07-07 18:39:30 +01:00
Shakker
4db63820ee refactor: preserve wrapped file preview performance 2026-07-07 18:39:30 +01:00
Shakker
f7e0ebbf34 fix: avoid duplicate file preview autofocus 2026-07-07 18:39:30 +01:00
Shakker
b64b09a32b docs: note virtual file preview improvements 2026-07-07 18:39:30 +01:00
Shakker
f8ebaf5225 test: cover virtual file preview behavior 2026-07-07 18:39:30 +01:00
Shakker
476017d775 fix: stabilize virtual file preview scrolling 2026-07-07 18:39:30 +01:00
咸士山 0668001391
c20abcbf01 perf(ui): add virtual scrolling to file preview modal code viewer 2026-07-07 18:39:30 +01:00
Vincent Koc
b88f80940a refactor: localize internal implementation symbols (#101831) 2026-07-07 10:23:36 -07:00
Alix-007
fa84741f93 fix(claude-cli): surface re-auth hint when subprocess OAuth token expires (#97669)
* fix(claude-cli): surface re-auth hint when subprocess OAuth token expires

When the claude-cli subprocess emits a 401 "Failed to authenticate. API
Error: 401 Invalid authentication credentials" because its stored OAuth
token has expired, the error was surfaced as the generic provider-auth
copy instead of the targeted re-auth hint.

Two fixes:

1. Extend isOAuthRefreshFailureMessage to recognise the claude-cli
   subprocess 401 error shape (requires "claude-cli" prefix + 401 +
   auth failure text). extractOAuthRefreshFailureProvider returns
   "claude-cli" for this pattern; classifyOAuthRefreshFailureReason
   maps it to "revoked" so the "expired" copy is shown.

2. Reorder both classification sites in buildExternalRunFailureReply and
   the runAgentTurnWithFallback catch block so the OAuth-refresh check
   runs before classifyProviderRequestError.  The typed 401 branch in
   classifyProviderRequestError would otherwise intercept the FailoverError
   before the OAuth hint path is ever reached.

Fixes #97553

* fix(claude-cli): use correct auth login command format in re-auth hint

--provider claude-cli is not a registered provider id; the correct
command to re-authenticate the claude subprocess is:

  openclaw models auth login --provider anthropic --method cli

Add a special-case branch in buildOAuthRefreshFailureLoginCommand so
that a 'claude-cli' sanitized provider emits the two-flag form instead
of the generic --provider <id> template.  Update the regression test
expectation to match.

* test(claude-cli): expect CLI auth re-login command

* fix(claude-cli): classify structured OAuth auth failures

* test(claude-cli): add real http oauth expiry proof

* test(claude-cli): add proof output to real HTTP server OAuth test

* test(claude-cli): add proof console.log to real HTTP server test

* test(claude-cli): keep real HTTP OAuth proof output explicit

* fix(agents): include Claude CLI reauth step

* test(claude-cli): expect full cli reauth command

* test(claude-cli): align reauth hint with terminal wording

* chore: retrigger claude-cli CI after opengrep fetch failure
2026-07-07 12:51:13 -04:00
cxbAsDev
f92ed16e60 fix(sessions): bound trajectory snapshot and pointer reads (#101450)
* fix(sessions): bound trajectory snapshot and pointer reads

* test(sessions): align oversized snapshot assertion with bounded reader error message

* fix(sessions): cap follow-mode trajectory deltas

ClawSweeper review noted that the trajectory snapshot read was bounded
but the follow-mode delta read (Buffer.alloc(fileState.size - offset))
was not. A runaway trajectory append could still OOM the tail loop.
Reject deltas above TRAJECTORY_RUNTIME_FILE_MAX_BYTES and add regression
coverage for the oversized-delta path.

* test(sessions): exercise trajectory limits through command path

---------

Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com>
2026-07-07 09:49:27 -07:00
Josh Lehman
453f5968bb refactor(gateway): route chat transcript injection through the session accessor (#101688)
* refactor(gateway): route chat transcript injection through the session accessor

* fix(gateway): avoid map-spread in source reply mirror rewrite results

* perf(sessions): find injected transcript duplicates with a reverse early-exit scan
2026-07-07 09:10:30 -07:00
Shakker
70de9ff20b fix: keep debug and logs on top-level routes (#100928) 2026-07-07 16:53:48 +01:00
Shakker
598a6ff22c test: update settings sidebar route expectation 2026-07-07 16:53:48 +01:00
Shakker
a3477eafb9 docs: update Control UI MCP settings route 2026-07-07 16:53:48 +01:00
Shakker
c3f6d8a463 test: cover settings routes through compiled router 2026-07-07 16:53:48 +01:00
Shakker
9d15544038 fix: use configured Control UI base path at startup 2026-07-07 16:53:48 +01:00
vyctorbrzezowski
2508fb4832 improve(ui): propose settings route cleanup 2026-07-07 16:53:48 +01:00
Vincent Koc
3d206140f3 refactor: localize internal implementation constants (#101758) 2026-07-07 08:34:13 -07:00
wings1029
d633a2df42 fix(http-error-body): keep emoji / surrogate pairs intact during error body truncation (#101728)
* fix(http-error-body): keep emoji / surrogate pairs intact during error body truncation

Replace .slice(0, limits.maxChars) with truncateUtf16Safe() so that
emoji straddling the maxChars boundary don't produce lone surrogates
that render as � in error diagnostics. Matches the sibling http-body.ts
which already uses truncateUtf16Safe.

Co-Authored-By: Claude <noreply@anthropic.com>

* test: cover UTF-16 HTTP body branches

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-07 16:06:13 +01:00