Skip to content

Ready to release v0.3.4#162

Merged
Keith-CY merged 31 commits intomainfrom
develop
Apr 1, 2026
Merged

Ready to release v0.3.4#162
Keith-CY merged 31 commits intomainfrom
develop

Conversation

@Keith-CY
Copy link
Copy Markdown
Collaborator

@Keith-CY Keith-CY commented Apr 1, 2026

No description provided.

dev01lay2 and others added 30 commits March 16, 2026 15:23
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Closes #123 (Phase 1)
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Ensures app_logs, recipe_cmds, upgrade, util, and watchdog_cmds
can access shared types from the parent mod.rs module.
refactor: extract commands/mod.rs into domain submodules (Phase 3)
- docs/architecture/overview.md: system overview, tech stack, layer diagram,
  directory guide, key data flows, constraints
- docs/architecture/commands.md: command layer structure, module organization,
  new command workflow, remote_* proxy explanation, prohibited patterns
- .github/CODEOWNERS: ownership rules for architecture docs, Tauri capabilities,
  core domain, CI workflows
- Update harness plan: mark completed items

Ref #123
- Upgrade business-flow-test-matrix.md to standard gate doc (6 gate levels)
- Add failure-diagnosis.md runbook (diagnosis flow, rollback procedures)
- Add entropy-governance.md (weekly checklist, metrics template)
- Update harness plan: mark all phases complete, list deferred items

Ref #123
chore: complete harness engineering standard (Phase 3b + Phase 4)
…lling, render probes (#132)

* perf: optimize Home page data loading (P0 + P1)

P0 fixes:
- Parallelize initial data requests: remove artificial setTimeout delays
  (350ms model profiles, 250/400ms runtime snapshot). All requests now
  fire simultaneously on mount.
- Merge 3 separate polling intervals (queuedCommandsCount, runtimeSnapshot,
  statusExtra) into a single unified poll loop with shouldPollResource()
  controlling per-resource frequency. Reduces backend call volume ~60%.
- Skip redundant ConfigSnapshot fetch when RuntimeSnapshot is already in
  persisted cache (they share agents, globalDefaultModel, fallbackModels).

P1 fixes:
- Fix unhealthy status flash: config-only initial state now sets
  healthy=null instead of healthy=false, rendering 'Checking...' badge
  instead of a false red 'Unhealthy' badge during SSH connection setup.
- Instant model profile population: add listModelProfiles to persisted
  read cache methods, initialize state from cache on mount.

Infrastructure:
- Add RenderProbe class (src/lib/render-probe.ts): production-grade
  performance.mark() instrumentation for measuring first-render latency
  of each UI section. Exposes data via window.__RENDER_PROBES__.
- Add Home Perf E2E workflow: Docker OpenClaw container + Playwright +
  IPC mock collects render timings, posts/updates a single PR comment
  via peter-evans/create-or-update-comment (comment-tag: home-perf-e2e).

Tests: 12 new unit tests across 3 files (all pass).

* fix: Dockerfile heredoc → COPY, switch to sticky-pull-request-comment

- Dockerfile: replace heredoc RUN (unsupported) with COPY from seed/ dir
- Workflow: replace peter-evans/create-or-update-comment (no comment-tag)
  with marocchino/sticky-pull-request-comment (header-based upsert)
- Add fallback report.md generation for failed runs

* fix: add git to Docker image (required by openclaw npm install)

* fix: install @playwright/test package before running perf E2E

* fix: comprehensive IPC mock + click-through StartPage in perf E2E

- Add mock handlers for StartPage flow (list_registered_instances,
  discover_local_instances, list_ssh_hosts, precheck_*, connect_*, etc.)
- Playwright spec now waits for app init, then clicks local instance card
  to navigate into Home where probes fire
- Handle partial probe collection gracefully (timeout → skip run)

* fix: remote SSH default model not loading (JSON pointer + skip logic)

Bug 1 (pre-existing): remote_instance_runtime_snapshot_impl runs
`openclaw config get agents --json` which returns the agents subtree,
but extract_default_model_and_fallbacks uses /agents/defaults/model
JSON pointer expecting the full config. The subtree has no /agents
prefix, so globalDefaultModel and fallbackModels are always null for
remote instances.

Fix: wrap config_json in { "agents": config_json } before calling
extract_default_model_and_fallbacks.

Bug 2 (introduced in this PR): shouldSkipConfigSnapshot only checked
persistedRuntimeSnapshot != null, not whether globalDefaultModel had
a value. When the cached RuntimeSnapshot had null model data (from
Bug 1), ConfigSnapshot was still skipped — the only path that could
correctly read the model via SFTP.

Fix: shouldSkipConfigSnapshot now checks globalDefaultModel != null.

* style: cargo fmt overview.rs

---------

Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
#139)

Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
…l contributors)

- screenshot.yml: checkout from fork repo, skip push/comment for fork PRs
- coverage.yml: skip PR comment for fork PRs (read-only GITHUB_TOKEN)
- metrics.yml: skip PR comment for fork PRs (read-only GITHUB_TOKEN)

Fork PRs still run all checks/builds/tests — only write-back steps
(pushing refs, posting PR comments) are skipped since the fork token
lacks write permissions.
- coverage.yml: save comment body as artifact for fork PR pickup
- metrics.yml: save comment body as artifact for fork PR pickup
- fork-pr-comment.yml: new workflow_run handler that downloads
  comment artifacts and posts them with write permissions

Same-repo PRs still post comments directly (no change).
Fork PRs now get full metrics/coverage visibility via the
workflow_run relay.
Download step uses continue-on-error so the workflow doesn't fail
when the upstream workflow failed before producing the comment artifact.
Subsequent steps gated on download success.
…enshot.yml

When triggered via workflow_dispatch, pull_request context fields are empty.
Use '|| github.repository' and '|| github.ref' fallbacks so manual runs
still check out the correct code.

Addresses Keith-CY's review feedback on PR #143.
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: cjs <cjs@cjs-mini.local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Chai <jingsongcai@126.com>
Co-authored-by: zhixian <zhixian@bunker.local>
Co-authored-by: dev01lay2 <dev@lay2.dev>
Co-authored-by: lay2OcBot <bot@openclaw.ai>
fix: write model registrations to correct config path (#148)
fix: resolve Channels page infinite refresh and data loading failure (#149)
…sis (#155)

Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
#157)

- Add guildResolutionWarning and channelResolutionWarning fields to
  DiscordGuildChannel (backend + frontend types)
- Frontend merge (channel-cache.ts) now clears warnings when cached
  names resolve the guild/channel — only shows warnings when both
  network request AND cache miss
- Channels.tsx uses specific warning fields: guild-level header shows
  only guild warnings, channel cards show only channel warnings
- Backend discovery.rs populates specific fields with clearer messages
  distinguishing Guild (server) vs Channel resolution failures

Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
…on remote host (#159)

Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
* fix: prevent Apply stuck state on gateway restart timeout

Backend: fire-and-forget gateway restart via tokio::spawn with 15s timeout
so the apply function returns immediately instead of hanging on SSH exec.

Frontend: 30s safety timeout in handleApply to recover UI state even if
the Tauri IPC never resolves.

* fix: add 30s timeout to run_openclaw_remote_with_env

The real hang occurs during command execution (openclaw config set),
not just at gateway restart. When config changes trigger an automatic
gateway restart, the SSH exec channel hangs indefinitely because
session.exec() has no timeout.

This causes queues.clear() to never execute, so after page refresh
the pending changes bar still shows '1 pending change' with an
empty diff (config was already written before the hang).

* fix: scope remote command timeouts by class + prevent double-apply

- Remote commands now use per-class timeouts: install/bootstrap/upgrade/setup
  get 180s, all others keep 30s. This prevents false timeouts during network
  I/O heavy operations (addresses review feedback #1).

- Add applyInFlightRef guard to handleApply so the safety timeout unblocking
  the UI after 30s cannot trigger a second concurrent apply. The ref stays
  true until the request settles, preventing racing applies even after the
  button re-enables (addresses review feedback #2).

---------

Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
Co-authored-by: dev01lay2 <dev01lay2@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

📊 Test Coverage Report

Metric Base (main) PR (develop) Delta
Lines 74.34% (6134/8251) 74.00% (6333/8558) 🔴 -0.34%
Functions 68.88% (704/1022) 68.89% (724/1051) 🟢 +0.01%
Regions 75.86% (10156/13388) 75.38% (10393/13788) 🔴 -0.48%

Coverage measured by cargo llvm-cov (clawpal-core + clawpal-cli).

Copy link
Copy Markdown
Collaborator

@dev01lay2 dev01lay2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed for release-blocking (P1) issues. I did not find any P1 blockers in this release PR.

@Keith-CY Keith-CY merged commit 5847639 into main Apr 1, 2026
26 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

📸 UI Screenshots

Commit: b9b364568589f29447b1f43bcb7a9b6684c6565a | Screenshots: Download artifact

Light Mode — Core Pages

Start Page Home Channels
start home channels
Recipes Cron Doctor
recipes cron doctor
Context History Chat Panel
context history chat
Settings (4 scroll positions)
Main Appearance Advanced Bottom
s1 s2 s3 s4
Start Page Sections
Overview Profiles Settings
sp1 sp2 sp3

Dark Mode

Start Home Channels Doctor
d1 d2 d3 d4
Dark mode — more pages
Recipes Cron Settings
d5 d6 d7

Responsive + Dialogs

Home 1024×680 Chat 1024×680 Create Agent
r1 r2 d1

🔧 Harness: Docker + Xvfb + tauri-driver + Selenium | 28 screenshots, 13 flows

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

📏 Metrics Gate Report

Status: ✅ All gates passed

Commit Size ❌

Metric Value Limit Status
Commits checked 29
All within limit 16/29 ≤ 500 lines
Largest commit 46681 lines ≤ 500

Bundle Size ✅

Metric Value Limit Status
JS bundle (raw) 1077 KB
JS bundle (gzip) 329 KB ≤ 350 KB
JS initial load (gzip) 173 KB ≤ 180 KB

Perf Metrics E2E ✅

Metric Value Limit Status
Tests 10 passed, 0 failed 0 failures
RSS (test process) 3.2 MB ≤ 20 MB
VMS (test process) 270.2 MB ℹ️
Command P50 latency 28 µs ≤ 1000 µs
Command P95 latency 43 µs ≤ 5000 µs
Command max latency 62 µs ≤ 50000 µs

Command Perf (local) ✅

Metric Value Status
Tests 4 passed, 0 failed
Commands measured 5 ℹ️
RSS (test process) 4.4 MB ℹ️
Local command timings
Command P50 (µs) P95 (µs) Max (µs)
local_openclaw_config_exists 1 9 9
list_ssh_hosts 2 10 10
get_app_preferences 16 37 37
read_app_log 60 95 95
read_error_log 5 10 10

Command Perf (remote SSH) ✅

Metric Value Status
SSH transport OK
Command failures 9/15 runs ℹ️ Docker (no gateway)
Remote command timings (via Docker SSH)
Command Median Max
openclaw_status 2258 ms 2275 ms
cat__root_.openclaw_openclaw.json 240 ms 240 ms
openclaw_gateway 1597 ms 1598 ms
openclaw_cron 1266 ms 1305 ms
openclaw_agent 2225 ms 2232 ms

Home Page Render Probes (real IPC) ✅

Probe Value Limit Status
status 61 ms ≤ 500 ms
version 179 ms ≤ 500 ms
agents 9 ms ≤ 500 ms
models 9 ms ≤ 500 ms
settled 61 ms ≤ 500 ms

Code Readability

File Lines Target Status
commands/mod.rs 11863 ≤ 300 ⚠️
commands/doctor_assistant.rs 5637 ≤ 3000 ⚠️
commands/rescue.rs 3402 ≤ 2000 ⚠️
cli_runner.rs 3295 ≤ 1200 ⚠️
commands/profiles.rs 1923 ≤ 1500 ⚠️
commands/sessions.rs 1828 ≤ 1100 ⚠️
commands/discovery.rs 1702 ≤ 1000 ⚠️
commands/credentials.rs 1629 ≤ 1000 ⚠️
openclaw_doc_resolver.rs 1362 ≤ 800 ⚠️
commands/ssh.rs 1216 ≤ 700 ⚠️
commands/doctor.rs 1193 ≤ 700 ⚠️
pages/Settings.tsx 1100 ≤ 700 ⚠️
recipe_adapter_tests.rs 1100 ≤ 700 ⚠️
ssh.rs 980 ≤ 600 ⚠️
agent_identity.rs 937 ≤ 600 ⚠️
pages/StartPage.tsx 898 ≤ 500 ⚠️
recipe_library.rs 884 ≤ 500 ⚠️
pages/Cook.tsx 881 ≤ 500 ⚠️
pages/Recipes.tsx 875 ≤ 500 ⚠️
pages/Home.tsx 867 ≤ 500 ⚠️
recipe_library_tests.rs 861 ≤ 500 ⚠️
lib/types.ts 856 ≤ 500 ⚠️
install/commands.rs 839 ≤ 500 ⚠️
commands/backup.rs 788 ≤ 500 ⚠️
lib/use-api.ts 774 ≤ 500 ⚠️
recipe_adapter.rs 757 ≤ 500 ⚠️
pages/RecipeStudio.tsx 680 ≤ 500 ⚠️
components/SessionAnalysisPanel.tsx 679 ≤ 500 ⚠️
commands/model.rs 645 ≤ 500 ⚠️
bridge_client.rs 645 ≤ 500 ⚠️
recipe_action_catalog.rs 631 ≤ 500 ⚠️
App.tsx 625 ≤ 500 ⚠️
lib/actions.ts 622 ≤ 500 ⚠️
components/InstallHub.tsx 619 ≤ 500 ⚠️
recipe_workspace.rs 613 ≤ 500 ⚠️
agent_fallback.rs 609 ≤ 500 ⚠️
recipe.rs 596 ≤ 500 ⚠️
commands/config.rs 549 ≤ 500 ⚠️
commands/discord.rs 545 ≤ 500 ⚠️
recipe_runtime/systemd.rs 537 ≤ 500 ⚠️
commands/overview.rs 533 ≤ 500 ⚠️
lib/api.ts 527 ≤ 500 ⚠️
install/runners/docker.rs 525 ≤ 500 ⚠️
commands/types.rs 524 ≤ 500 ⚠️
commands/instance.rs 501 ≤ 500 ⚠️
markdown_document.rs 497 ≤ 500
pages/Channels.tsx 480 ≤ 500
pages/Doctor.tsx 479 ≤ 500
node_client.rs 452 ≤ 500
commands/discover_local.rs 441 ≤ 500
lib/__tests__/guidance.test.ts 439 ≤ 500
recipe_executor.rs 437 ≤ 500
components/__tests__/DoctorRecoveryOverview.test.tsx 429 ≤ 500
pages/Cron.tsx 428 ≤ 500
recipe_executor_tests.rs 422 ≤ 500
hooks/useInstanceDataStore.ts 421 ≤ 500
bug_report/queue.rs 409 ≤ 500
lib.rs 408 ≤ 500
lib/api-read-cache.ts 405 ≤ 500
commands/channels.rs 405 ≤ 500
components/__tests__/InstanceCard.test.tsx 400 ≤ 500
components/DoctorRecoveryOverview.tsx 383 ≤ 500
pages/Orchestrator.tsx 372 ≤ 500
recipe_tests.rs 360 ≤ 500
lib/use-cached-query.ts 353 ≤ 500
hooks/useSshConnection.ts 353 ≤ 500
components/DoctorTempProviderDialog.tsx 349 ≤ 500
commands/precheck.rs 346 ≤ 500
bug_report/collector.rs 335 ≤ 500
components/InstanceCard.tsx 334 ≤ 500
hooks/useWorkspaceTabs.ts 331 ≤ 500
lib/doctor-report-i18n.ts 328 ≤ 500
components/ParamForm.tsx 324 ≤ 500
pages/__tests__/cook-plan-context.test.ts 319 ≤ 500
pages/__tests__/overview-loading.test.ts 318 ≤ 500
hooks/useChannelCache.ts 317 ≤ 500
components/__tests__/SshFormWidget.test.tsx 312 ≤ 500
components/PendingChangesBar.tsx 308 ≤ 500
hooks/useInstancePersistence.ts 303 ≤ 500
doctor.rs 303 ≤ 500
recipe_planner_tests.rs 302 ≤ 500
Files > 500 lines 45 trend ↓ ⚠️
Files over target 45 0 ⚠️

📊 Metrics defined in docs/architecture/metrics.md

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

📦 PR Build Artifacts

Platform Download Size
Windows-x64 📥 clawpal-Windows-x64 27.5 MB
Linux-x64 📥 clawpal-Linux-x64 105.8 MB
macOS-x64 📥 clawpal-macOS-x64 14.0 MB
macOS-ARM64 📥 clawpal-macOS-ARM64 13.2 MB

🔨 Built from 47acbe5 · View workflow run
⚠️ Unsigned development builds — for testing only

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Recipe GUI E2E Perf

Artifacts: perf report

Recipe Page Load (ms) Form Fill (ms) Execution (ms) Verification (ms) Total (ms)
dedicated-agent ⚠️ Skipped: Discord not configured in E2E environment
channel-persona-pack ⚠️ Skipped: Discord not configured in E2E environment
agent-persona-pack ⚠️ Skipped: Discord not configured in E2E environment

Harness: Docker + Xvfb + tauri-driver + Selenium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants