Commit Graph

327 Commits

Author SHA1 Message Date
Gustavo Madeira Santana
241d39daea fix(auto-reply): harden fallback lifecycle formatting 2026-02-19 12:57:41 -08:00
Gustavo Madeira Santana
9baae38704 status: compact fallback model presentation 2026-02-19 12:57:41 -08:00
joshavant
a8510c451e feat(auto-reply): add model fallback transition visibility in verbose logs, status, and web ui
Signed-off-by: joshavant <830519+joshavant@users.noreply.github.com>
2026-02-19 12:49:36 -08:00
Peter Steinberger
3077c35831 fix(ui): unblock docker onboarding build 2026-02-19 16:32:33 +01:00
Peter Steinberger
b4dbe03298 refactor: unify restart gating and update availability sync 2026-02-19 10:00:41 +01:00
Peter Steinberger
34ddf0edc0 style: format gateway health state and ui render 2026-02-19 08:49:38 +00:00
orlyjamie
2ddc13cdb7 feat(ui): add update warning banner to control dashboard
SecurityScorecard's STRIKE research recently identified over 40,000
exposed OpenClaw gateway instances, with 35.4% running known-vulnerable
versions. The gateway already performs an npm update check on startup
and compares against the registry every 24 hours — but the result is
only logged to the server console. The control UI has zero visibility
into whether the running version is outdated, which means operators
have no idea they're exposed unless they happen to read server logs.

OpenClaw's user base is broadening well beyond developers who live in
terminals. Self-hosters, small teams, and non-technical operators are
deploying gateways and relying on the control dashboard as their
primary management interface. For these users, security has to be
surfaced where they already are — not hidden behind CLI output they
will never see. Making version awareness frictionless and actionable
is a prerequisite for reducing that 35.4% number.

This PR adds a sticky red warning banner to the top of the control UI
content area whenever the gateway detects it is running behind the
latest published version. The banner includes an "Update now" button
wired to the existing update.run RPC (the same mechanism the config
page already uses), so operators can act immediately without switching
to a terminal.

Server side:
- Cache the update check result in a module-level variable with a
  typed UpdateAvailable shape (currentVersion, latestVersion, channel)
- Export a getUpdateAvailable() getter for the rest of the process
- Add an optional updateAvailable field to SnapshotSchema (backward
  compatible — old clients ignore it, old servers simply omit it)
- Include the cached update status in buildGatewaySnapshot() so it
  is delivered to every UI client on connect and reconnect

UI side:
- Add updateAvailable to GatewayHost, AppViewState, and the app's
  reactive state so it flows through the standard snapshot pipeline
- Extract updateAvailable from the hello snapshot in applySnapshot()
- Render a .update-banner.callout.danger element with role="alert"
  as the first child of <main>, before the content header
- Wire the "Update now" button to runUpdate(state), the same
  controller function used by the config tab
- Use position:sticky and negative margins to pin the banner
  edge-to-edge at the top of the scrollable content area
2026-02-19 09:43:45 +01:00
Peter Steinberger
b8b43175c5 style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
Peter Steinberger
31f9be126c style: run oxfmt and fix gate failures 2026-02-18 01:29:02 +00:00
Tyler Yust
087dca8fa9 fix(subagent): harden read-tool overflow guards and sticky reply threading (#19508)
* fix(gateway): avoid premature agent.wait completion on transient errors

* fix(agent): preemptively guard tool results against context overflow

* fix: harden tool-result context guard and add message_id metadata

* fix: use importOriginal in session-key mock to include DEFAULT_ACCOUNT_ID

The run.skill-filter test was mocking ../../routing/session-key.js with only
buildAgentMainSessionKey and normalizeAgentId, but the module also exports
DEFAULT_ACCOUNT_ID which is required transitively by src/web/auth-store.ts.

Switch to importOriginal pattern so all real exports are preserved alongside
the mocked functions.

* pi-runner: guard accumulated tool-result overflow in transformContext

* PI runner: compact overflowing tool-result context

* Subagent: harden tool-result context recovery

* Enhance tool-result context handling by adding support for legacy tool outputs and improving character estimation for message truncation. This includes a new function to create legacy tool results and updates to existing functions to better manage context overflow scenarios.

* Enhance iMessage handling by adding reply tag support in send functions and tests. This includes modifications to prepend or rewrite reply tags based on provided replyToId, ensuring proper message formatting for replies.

* Enhance message delivery across multiple channels by implementing sticky reply context for chunked messages. This includes preserving reply references in Discord, Telegram, and iMessage, ensuring that follow-up messages maintain their intended reply targets. Additionally, improve handling of reply tags in system prompts and tests to support consistent reply behavior.

* Enhance read tool functionality by implementing auto-paging across chunks when no explicit limit is provided, scaling output budget based on model context window. Additionally, add tests for adaptive reading behavior and capped continuation guidance for large outputs. Update related functions to support these features.

* Refine tool-result context management by stripping oversized read-tool details payloads during compaction, ensuring repeated read calls do not bypass context limits. Introduce new utility functions for handling truncation content and enhance character estimation for tool results. Add tests to validate the removal of excessive details in context overflow scenarios.

* Refine message delivery logic in Matrix and Telegram by introducing a flag to track if a text chunk was sent. This ensures that replies are only marked as delivered when a text chunk has been successfully sent, improving the accuracy of reply handling in both channels.

* fix: tighten reply threading coverage and prep fixes (#19508) (thanks @tyler6204)
2026-02-17 15:32:52 -08:00
Seb Slight
afd78133ba fix(ui): revert PR #18093 directive tags (#19188) 2026-02-17 09:16:13 -05:00
cpojer
d0cb8c19b2 chore: wtf. 2026-02-17 13:36:48 +09:00
Sebastian
ed11e93cf2 chore(format) 2026-02-16 23:20:16 -05:00
cpojer
6b8c0bc697 chore: Format files. 2026-02-17 12:00:38 +09:00
Sebastian
3df8305cb6 fix(ui): gate sessions refresh on successful delete 2026-02-16 21:46:04 -05:00
Peter Steinberger
9789dfd95b fix(ui): correct usage range totals and muted styles 2026-02-17 03:04:00 +01:00
cpojer
01ea808876 chore: Format files. 2026-02-17 10:57:31 +09:00
Peter Steinberger
742e6543c7 fix(ui): preserve locale bootstrap and trusted-proxy overview behavior 2026-02-17 02:46:24 +01:00
Peter Steinberger
dcdbbd8b3b test: replace ui prototype method patches with instance stubs 2026-02-17 01:57:51 +01:00
cpojer
90ef2d6bdf chore: Update formatting. 2026-02-17 09:18:40 +09:00
Jonathan Gelin
bc2e02bb34 fix(ui/usage): remove remaining timeSeriesCursor reference in renderContextPanel 2026-02-17 00:02:05 +01:00
Jonathan Gelin
647d69881b fix(ui/usage): align client log limit with server cap (1000) and remove unused param
- Client requested 2000 logs but server caps at 1000
- Remove unused timeSeriesCursor param from renderContextPanel
2026-02-17 00:02:05 +01:00
Jonathan Gelin
0302cf89b0 feat(timeline): dual-handle range selection on Usage Over Time chart
- Dual drag handles on SVG chart for time range selection
- Bars outside range dimmed, stats + conversation filtered to range
- Slot-based bar sizing prevents overflow at any point count
- Handle-only drag zones with col-resize cursor
- Reset button to clear selection
- computeFilteredUsage() helper with 8 unit tests
- Named constants, CSS classes instead of inline styles
2026-02-17 00:02:05 +01:00
Jonathan Gelin
bdbb872c07 fix(ui/usage): replace undefined --text-muted CSS variable with --muted
The usage tab styles referenced var(--text-muted) which is not defined
anywhere in the CSS. This resolved to transparent/initial, making text
invisible in dark mode. The correct variable is var(--muted) (#71717a),
which is used throughout the rest of the UI (85+ occurrences).

47 occurrences fixed across 3 style files.
2026-02-17 00:01:42 +01:00
HAL
e24e465c00 fix(webchat): strip reply/audio directive tags before rendering #18079
The webchat UI rendered [[reply_to_current]], [[reply_to:<id>]], and
[[audio_as_voice]] tags as literal text because extractText() passed
assistant content through without stripping inline directives.

Add stripDirectiveTags() to the UI chat layer and apply it to all three
extractText code paths (string content, content array, .text property)
for assistant messages only. Regex mirrors src/utils/directive-tags.ts.

Fixes #18079
2026-02-16 23:59:29 +01:00
Santosh
382158fb30 fix(ui): auto-refresh sessions list after deletion
Remove dead loadSessions call from deleteSession controller that was
silently failing due to sessionsLoading guard. The refresh now happens
explicitly in the UI layer after successful deletion.

- src/ui/controllers/sessions.ts: remove internal loadSessions call
- src/ui/app-render.ts: add async onDelete handler with explicit refresh
2026-02-16 23:51:37 +01:00
Jadilson Guedes
66fc12a40c style: apply oxfmt formatting to app-render.ts 2026-02-16 23:51:34 +01:00
Jadilson Guedes
1bb2d65ff3 fix: remove unused imports and simplify boolean comparison 2026-02-16 23:51:34 +01:00
Jadilson Guedes
fe613297a7 fix: add type assertions for unknown value indexing in translate.ts 2026-02-16 23:51:34 +01:00
Jadilson Guedes
d30f5a2438 fix: resolve linting issues (curly braces, unused imports, any types) 2026-02-16 23:51:34 +01:00
Jadilson Guedes
075317ab16 fix: correct function names in overview.ts and add type assertion in translate.ts 2026-02-16 23:51:34 +01:00
Jadilson Guedes
f20bef3d79 fix: add .ts extensions to i18n imports for ESM compatibility 2026-02-16 23:51:34 +01:00
Jadilson Guedes
e0c45eab49 style: apply oxfmt formatting 2026-02-16 23:51:34 +01:00
Jadilson Guedes
98ed2e7130 fix(i18n): add missing agents and usage tabs to zh-TW locale 2026-02-16 23:51:34 +01:00
Jadilson Guedes
cf44a0c4c1 fix(ui): localize language selector and validate stored locale
- Add translation keys for language selector label and language names
   - Update all locale files (en, pt-BR, zh-CN, zh-TW) with:
     - overview.access.language key for selector label
     - languages.* keys for language display names
   - Localize language selector in overview.ts to react to locale changes
   - Add validation for stored locale in app.ts to prevent invalid values
     from causing silent failures in setLocale

   Fixes issues identified in code review:
   - Unlocalized language selector inconsistency
   - Settings locale type drift risk
2026-02-16 23:51:34 +01:00
Manus AI
a9c952b13a fix(i18n): resolve dynamic import warnings and add zh-TW locale 2026-02-16 23:51:34 +01:00
Manus AI
4b17ce7f48 feat(ui): add i18n support with English, Chinese, and Portuguese 2026-02-16 23:51:34 +01:00
Aditya Singh
facfa410a7 fix(tool-display): satisfy format/lint and address review feedback
- extract web_search/web_fetch detail resolvers into common module\n- fix node -c classification so file path remains positional\n- remove dead git subcommands set\n- keep exec summary refinements (heredoc/node check/git -C/preamble strip)\n- make tests cover node -c syntax-check path\n- run format:check, tsgo, lint, and focused e2e tests
2026-02-16 23:50:08 +01:00
Aditya Singh
24f213e7ed feat(tool-display): add intent-first details and exec summaries
- add human-readable read/write/edit/attach details with path alias support\n- add explicit web_search/web_fetch phrasing (quoted query, mode/limit)\n- make detail text title-first by returning detail-only in formatters\n- add deterministic exec summarizer (wrappers, pipelines, heredoc, git/node/python heuristics, preamble stripping)\n- extend e2e coverage for file/web/exec cases
2026-02-16 23:50:08 +01:00
Advait Paliwal
bc67af6ad8 cron: separate webhook POST delivery from announce (#17901)
* cron: split webhook delivery from announce mode

* cron: validate webhook delivery target

* cron: remove legacy webhook fallback config

* fix: finalize cron webhook delivery prep (#17901) (thanks @advaitpaliwal)

---------

Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
2026-02-16 02:36:00 -08:00
Peter Steinberger
6dfefa1be1 test(ui): cover trailing-slash bootstrap basePath 2026-02-16 02:55:24 +00:00
Peter Steinberger
abd26b6e54 refactor(ui): reuse Control UI bootstrap path constant 2026-02-16 03:50:39 +01:00
Peter Steinberger
3b4096e02e fix(ui): load Control UI bootstrap config via JSON endpoint 2026-02-16 03:15:57 +01:00
Advait Paliwal
14fb2c05b1 Gateway/Control UI: preserve partial output on abort (#15026)
* Gateway/Control UI: preserve partial output on abort

* fix: finalize abort partial handling and tests (#15026) (thanks @advaitpaliwal)

---------

Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
2026-02-15 16:55:28 -08:00
Peter Steinberger
fd3d452f1f fix(ci): fix ui cron test mock signature 2026-02-16 00:19:34 +00:00
Advait Paliwal
115cfb4430 gateway: add cron finished-run webhook (#14535)
* gateway: add cron finished webhook delivery

* config: allow cron webhook in runtime schema

* cron: require notify flag for webhook posts

* ui/docs: add cron notify toggle and webhook docs

* fix: harden cron webhook auth and fill notify coverage (#14535) (thanks @advaitpaliwal)

---------

Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
2026-02-15 16:14:17 -08:00
Tyler Yust
a948212ca7 fix(ui): show session labels in selector and standardize session key prefixes
- Display session labels in the session selector
- Cap selector width to 300px
- Standardize key prefixes and fallback names for subagent and cron job sessions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:20:54 -08:00
Peter Steinberger
5c233f4ded fix(ui): drop unused vi in test helper 2026-02-15 21:09:59 +00:00
Peter Steinberger
c623c51cf4 refactor(ui): share app mount hooks 2026-02-15 21:09:32 +00:00
Peter Steinberger
4920ca65db refactor(ui): dedupe usage session rows 2026-02-15 20:59:13 +00:00