openclaw/src
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
..
acp style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
agents test(agents): dedupe generic repeat loop fixtures 2026-02-19 08:33:49 +00:00
auto-reply test: remove duplicate extra-high think-level case 2026-02-19 08:30:26 +00:00
browser test(browser): dedupe explicit auth-mode auto-token checks 2026-02-19 08:32:58 +00:00
canvas-host Canvas: improve A2UI asset resolution and empty state (#20312) 2026-02-18 19:44:55 +00:00
channels refactor(shared): centralize @/# slug normalization 2026-02-18 23:34:15 +00:00
cli test(cli): dedupe cron edit existing-job lookup mocks 2026-02-19 08:38:50 +00:00
commands test: merge duplicate undefined api-key persistence checks 2026-02-19 08:27:40 +00:00
compat
config test(config): dedupe model provider fixture setup 2026-02-19 08:25:12 +00:00
cron test(cron): dedupe delayed-timer job assertions 2026-02-19 08:32:58 +00:00
daemon Fix LaunchAgent missing TMPDIR causing SQLITE_CANTOPEN on macOS (#20512) 2026-02-18 21:42:35 -05:00
discord test(discord): dedupe gateway proxy runtime fixture 2026-02-19 07:33:16 +00:00
docs
gateway feat(ui): add update warning banner to control dashboard 2026-02-19 09:43:45 +01:00
hooks test(hooks): dedupe gmail runtime path assertions 2026-02-19 08:25:12 +00:00
imessage perf(test): simplify shutdown rejection tick wait 2026-02-18 22:05:40 +00:00
infra feat(ui): add update warning banner to control dashboard 2026-02-19 09:43:45 +01:00
line test: merge duplicate line carousel column-limit cases 2026-02-18 22:41:25 +00:00
link-understanding style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
logging style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
macos
markdown style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
media test: merge media invalid-path scenarios 2026-02-18 23:28:53 +00:00
media-understanding test(media): dedupe active-model fallback resolver setup 2026-02-19 07:50:10 +00:00
memory test(memory): dedupe voyage embedding provider test setup 2026-02-19 07:37:06 +00:00
node-host refactor(node-host): extract invoke result helpers 2026-02-18 23:48:32 +00:00
pairing style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
plugin-sdk refactor(shared): reuse outbound text chunking core 2026-02-19 07:01:54 +00:00
plugins refactor(plugins): reuse plugin loader logger adapter 2026-02-18 23:48:32 +00:00
process perf(test): dedupe telegram thread cases and tighten PTY timer 2026-02-18 22:29:31 +00:00
providers style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
routing refactor(test): dedupe agent harnesses and routing fixtures 2026-02-18 04:49:22 +00:00
scripts
security refactor(security): share installed plugin directory scan helper 2026-02-19 00:29:07 +00:00
sessions style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
shared refactor(shared): reuse outbound text chunking core 2026-02-19 07:01:54 +00:00
signal refactor(signal): reuse shared reaction types 2026-02-18 23:34:15 +00:00
slack refactor(slack): share markdown render options 2026-02-18 18:33:48 +00:00
telegram test: remove duplicate telegram de-linkify case 2026-02-19 08:11:42 +00:00
terminal refactor(cli): share styled select prompt helper 2026-02-18 17:48:02 +00:00
test-helpers
test-utils refactor(test): share internal hook and npm pack assertions 2026-02-18 17:01:22 +00:00
tts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
tui refactor(tui): share select list theme styles 2026-02-18 22:31:45 +00:00
types
utils test(queue): cover collect drain helper states 2026-02-19 07:01:54 +00:00
web test(web): dedupe creds-update trigger helper in session tests 2026-02-19 07:52:32 +00:00
whatsapp test: dedupe line and whatsapp target resolution tests 2026-02-18 05:31:13 +00:00
wizard style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
channel-web.ts
docker-setup.test.ts
dockerfile.test.ts test(docker): cover browser install build arg 2026-02-16 22:35:27 -05:00
entry.ts
extensionAPI.ts
globals.ts
index.ts
logger.test.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
logger.ts
logging.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
polls.test.ts test: table-drive poll duration clamp cases 2026-02-18 23:27:50 +00:00
polls.ts
runtime.ts chore: chore: Fix types in tests 12/N. 2026-02-17 11:22:49 +09:00
utils.test.ts
utils.ts
version.test.ts refactor: centralize presence routing and version precedence coverage (#19609) 2026-02-18 00:02:51 -05:00
version.ts refactor: centralize presence routing and version precedence coverage (#19609) 2026-02-18 00:02:51 -05:00