Commit Graph

42 Commits

Author SHA1 Message Date
zhixian
3eacff3acd feat: achieve full remote/local feature parity across all pages
- Remote config dirty state: baseline/diff/apply/discard mechanism
  matching local behavior (RemoteConfigBaselines managed state)
- Remote update check: fallback to npm registry query via reqwest
  when `openclaw update status` unavailable on remote
- Discord guild names: resolve via Discord REST API using bot token
  from config, fixing guild IDs showing as names
- InstanceContext: add discordGuildChannels to prevent local/remote
  data mixing (replaces prop drilling through Cook/ParamForm)
- Remote agent creation: resolve profile ID to provider/model string
  before writing to config
- Remote profile creation: auto-reuse API key from same-provider
  existing profile; show auth suggestion in Settings UI
- Instance-aware: Chat, actions, ParamForm, Channels, Doctor,
  History, Home, Settings all branch on isRemote/isConnected
- Remote commands: chat, session management, model profiles,
  config baseline, Discord guild channels, update check

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-19 01:26:51 +09:00
zhixian
55e7fea15e feat: add SSH frontend — types, API, Tab Bar, App integration, remote Home
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:23:50 +09:00
zhixian
4da9e2bd03 feat: add SSH CRUD, connection, exec, SFTP, and remote status commands
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:19:15 +09:00
zhixian
3e71459f85 feat: add SSH connection pool module with exec and SFTP primitives
Implements SshConnectionPool with connect/disconnect/is_connected/exec/
sftp_read/sftp_write/sftp_list/sftp_remove methods using russh async SSH.
Supports key-based and ssh-agent authentication. Accepts all host keys
for now (TODO Phase 3).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:16:28 +09:00
zhixian
592ad4a95c chore: add russh SSH/SFTP dependencies
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-18 21:01:48 +09:00
zhixian
cbc929ddb1 docs: add SSH remote openclaw management design
Design document for managing remote openclaw instances via SSH/SFTP
from ClawPal. Covers architecture, connection management, phased
implementation plan (3 phases from MVP connectivity to full parity).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-18 20:47:19 +09:00
zhixian
b81d2636f4 feat: add session analysis and management to Doctor page
- Add analyze_sessions backend command that scans all agent sessions,
  classifies them as empty/low_value/valuable based on message count,
  age, and file size
- Add delete_sessions_by_ids command with support for both sessions
  and sessions_archive directories
- Add preview_session command to view full session message content
- Doctor page now has Analyze button (primary color) showing two-level
  view: agent summary with category badges, expandable session details
  with checkboxes for batch deletion
- Session IDs are clickable to preview conversation content in a dialog
- Delete/Deselect buttons placed next to clean buttons for easy access
- Optimistic UI updates on deletion without requiring re-analysis
- All heavy I/O commands run via spawn_blocking to avoid UI freezes
- Add Doctor route to App navigation sidebar
- Hide Memory section from Doctor page

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-18 20:04:27 +09:00
zhixian
2208f33177 feat: UI/UX overhaul — shared CreateAgentDialog, multi-platform Channels, skeleton loading, inline Chat panel
- Extract shared CreateAgentDialog with progressive disclosure (independent agent expands identity/persona fields)
- Redesign Channels page: self-contained, groups all channel types (Discord, Telegram, Feishu, QBot) with per-group refresh
- Add skeleton loading states for Home page agents and backups
- Replace Chat Sheet overlay with inline aside panel that pushes main content
- Add RecipeCard compact mode for Home page, with visible tag backgrounds
- Upgrade toast system to support multi-toast stacking with close buttons
- Unify SelectTrigger heights to size="sm" across all pages
- Add "Done" button to Cook completion card
- Replace ~25 silent .catch(() => {}) with console.error or user-visible feedback
- Fix create_agent to inherit default workspace for non-independent agents
- Register list_channels_minimal backend command for frontend access
- Remove unused globalLoading state and refreshDiscord from App.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 02:10:45 +09:00
zhixian
45e8e4d99b fix: prevent hang on gateway restart, fix delete_agent binding loss, add health check grace period
- Add 30s timeout to gateway restart command to prevent UI from hanging indefinitely
- Change delete_agent to reset bindings to "main" instead of removing them, preventing loss of channel binding entries
- Add health status grace period: show "Checking..." badge while gateway is restarting, retry every 2s up to 5 times before showing "Unhealthy"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 00:27:52 +09:00
zhixian
82bf38b2b2 feat: add toast feedback for Apply Changes and Discard operations
Show "Gateway restarted successfully" or error after Apply Changes,
and "Changes discarded" after Discard. Toast auto-dismisses after 3s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:48:12 +09:00
zhixian
065b726e65 fix: show restart hint after any config-modifying steps, not just config_patch
create_agent, bind_channel, setup_identity all modify openclaw.json
and need a gateway restart. Previously the hint only showed when
config_patch steps ran.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:45:02 +09:00
zhixian
b04b9c01b6 fix: detect skippable steps by checking individual template vars
Previously checked if the entire resolved arg was empty, which missed
cases like patchTemplate where {{persona}} resolves to empty but the
overall JSON string is not empty. Now checks each {{param}} reference
individually — if any referenced param is empty, the step is skipped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:40:07 +09:00
zhixian
99c505c179 fix: model_profile uses profile ID, fix boolean conversion for empty strings
- model_profile Select value changed from provider/model string to
  profile ID (backend expects ID, not display string)
- renderArgs no longer converts empty string to false; only explicit
  "true"/"false" become booleans. Fixes name/emoji being passed as
  boolean false to setup_agent_identity
- Boolean params default to "false" instead of empty string

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:35:58 +09:00
zhixian
01d131f977 feat: add model param to dedicated-channel-agent recipe
Model is required with a default of "use global default". Adds
defaultValue support to RecipeParam so params can have initial values.
Model profile selector now includes a "Use global default" option.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:32:10 +09:00
zhixian
a9c7e8876a fix: remove duplicate back-to-recipes button from App.tsx
The button was rendered outside Cook.tsx in the App shell. Cook.tsx
already has a back arrow in the title area.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:28:15 +09:00
zhixian
1a97705f2b feat: add dependsOn for conditional params, boolean checkbox support
Add "Create independent agent" checkbox that toggles visibility of
name/emoji/persona fields. Params with dependsOn are hidden when the
referenced boolean is unchecked, and their steps are auto-skipped.
Template substitution now converts "true"/"false" to native booleans.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:23:10 +09:00
zhixian
a373a7c068 fix: make name/emoji/persona optional, auto-skip empty steps, back button
- Make name, emoji, persona params optional in dedicated-channel-agent
- Auto-skip steps whose template args resolve to empty strings
- Move "Back to Recipes" to a back arrow next to the title

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:18:20 +09:00
zhixian
dbf1e69937 chore: clean up state.ts, remove unused recipe/preview state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:46:47 +09:00
zhixian
ccd46577c5 refactor: update RecipeCard, Recipes, Home for steps-based recipes
Show step count instead of impactCategory, simplify Recipes.tsx
state management, fix chat.ts preview_change tool.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:46:09 +09:00
zhixian
07fb88438c feat: rewrite Cook as step-by-step wizard
4-phase wizard: fill params → confirm steps → execute → done.
Supports retry/skip on failure, shows step status in real-time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:45:00 +09:00
zhixian
ccfbc384b0 feat: add action registry for step-based recipe execution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:44:20 +09:00
zhixian
1c96af57f1 refactor: update TS types for steps-based recipes, remove dead code
Add RecipeStep interface, update Recipe (remove patchTemplate/
impactCategory/impactSummary/action), replace previewApply/applyRecipe
with applyConfigPatch, delete recipe_catalog.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:43:51 +09:00
zhixian
1c636c35fd refactor: update Recipe to use steps, add apply_config_patch command
Replace patchTemplate/impactCategory/impactSummary with steps-based
recipe format. Remove preview_apply/apply_recipe commands, add
apply_config_patch for inline merge patches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:43:12 +09:00
zhixian
07267c08ee docs: recipe engine redesign — composable steps with wizard UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:35:04 +09:00
zhixian
99dbe35d46 feat: global chat drawer, setup-agent recipe, profile sync, UX improvements
- Chat as collapsible right-side Sheet drawer, accessible from all pages
- Replace default-model-switch recipe with setup-agent identity recipe
- Add setup_agent_identity backend command (writes IDENTITY.md)
- Add "agent" param type to ParamForm for agent picker dropdown
- Custom action support in Cook flow (non-config-patch recipes)
- Profile save/delete in Settings now syncs to other pages via configVersion
- Move Backups section from Doctor to Settings
- Hide Doctor tab from sidebar navigation
- History preview now opens in Dialog instead of inline at page bottom
- Simplify History.tsx from useReducer to useState

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:40:10 +09:00
zhixian
3286ae3af1 feat: Discord guild/channel pickers, apply flow, agent identity
- Replace raw guild_id/channel_id text inputs with dropdown pickers
  showing human-readable names from openclaw config
- Add persistent file-level cache for Discord channel data with
  dedicated Channels tab and refresh button
- Read agent name/emoji from IDENTITY.md in workspace directories
- Rename Install→Cook throughout UI
- Add step-by-step apply flow: apply config → restart gateway → done
- Add global loading overlay for blocking operations
- Use react-diff-viewer-continued for config diff preview
- Fix validation bugs (Option<usize> null handling, discord type bypass)
- Fix serde camelCase on PreviewResult/ApplyResult structs
- Make slow commands async (refresh_discord, restart_gateway)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:37:28 +09:00
zhixian
1fbf266034 fix: replace Popover+Command combobox with simple autocomplete
The Radix Popover-based ComboboxField didn't work in Tauri's webview
(clicks had no effect). Replaced with a plain Input + absolute-
positioned dropdown list that uses only standard DOM events — no
Radix Portal, no cmdk dependency, no asChild composition issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:01:50 +09:00
zhixian
fcee6de2b4 fix: combobox trigger submitting form instead of opening popover
The ComboboxField's Button inside the <form> defaulted to
type="submit", causing form submission on click. Added explicit
type="button" so it opens the dropdown instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:56:01 +09:00
zhixian
60d1595b8e feat: fix version display, add backup/restore before upgrade
- Fix Home showing "Update available" when versions are identical
  by adding frontend guard (latest !== installed)
- Add Rust backup commands: backup_before_upgrade copies openclaw dir
  (excluding sessions/archive) to .clawpal/backups/{timestamp}/,
  list_backups, restore_from_backup, delete_backup
- Home: add "Backup & Upgrade" button next to "View update" that
  creates a backup then opens the releases page
- Doctor: add "Backups" section listing available backups with
  Show, Restore (with confirmation), and Delete (with confirmation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:49:18 +09:00
zhixian
7d47b7f859 feat: add confirmation dialogs, show-folder buttons, refresh feedback
- Doctor: wrap all memory/session clear buttons with AlertDialog
  confirmation, destructive red styling, and "Show" folder buttons
- Doctor: add loading state ("Refreshing...") to Refresh button
- Settings: wrap profile Delete buttons with AlertDialog confirmation
- Settings: fix provider combobox not using cached catalog — prevent
  empty CLI refresh result from overwriting cached data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:51:10 +09:00
zhixian
af5b853016 feat: switch to shadcn light theme, improve Settings UX
- Replace custom dark navy color palette with shadcn default light theme
- Remove all custom --color-* CSS variables and use semantic classes
- Remove Chat Model section from Settings (no longer needed)
- Replace native <datalist> with Combobox (Popover + Command) for
  provider/model selection in Settings
- Add shadcn command, popover, and dialog components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 02:22:28 +09:00
zhixian
ca6bf7536f feat: migrate Settings page to shadcn Card/Input/Select/Checkbox/Badge/Button
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 02:00:25 +09:00
zhixian
30b2b11a65 feat: migrate Home page to shadcn Card/Badge/Button — remove all inline styles
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:53:55 +09:00
zhixian
499e74aaf4 feat: migrate Doctor page to shadcn Card/Badge/Button
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:51:14 +09:00
zhixian
8a88bd0565 feat: migrate History/Recipes/Install pages to shadcn components
Replace inline styles and old CSS class references with Tailwind
utilities and shadcn Card, Badge, Button, Input, and Label components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:48:09 +09:00
zhixian
eb6daad1e1 feat: migrate Chat to shadcn ScrollArea/Select/Input/Button
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:44:23 +09:00
zhixian
004460022a feat: migrate ParamForm to shadcn Input/Textarea/Label/Button
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:41:09 +09:00
zhixian
a26da28da3 feat: migrate DiffViewer + RecipeCard to shadcn components
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:38:38 +09:00
zhixian
f2eac4b5d6 feat: migrate App sidebar to shadcn Button + Separator + Tailwind
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:36:17 +09:00
zhixian
8d4bcd6009 chore: initialize shadcn/ui with Tailwind v4, add UI components
- Create components.json (new-york style, slate base, CSS variables)
- Add shadcn/ui components: button, card, input, select, badge,
  scroll-area, checkbox, separator, label, textarea
- Create src/lib/utils.ts with cn() helper (clsx + tailwind-merge)
- Replace old CSS classes in styles.css with Tailwind v4 @theme inline
  block containing shadcn color tokens and custom app theme colors
- Add radix-ui dependency (required by shadcn components)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:33:02 +09:00
zhixian
e7c6331110 chore: add Tailwind CSS v4 and shadcn utility dependencies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:28:04 +09:00
zhixian
700c5e9ab2 feat: ClawPal v0.1 — Tauri desktop GUI for OpenClaw
4-page layout (Home, Recipes, Settings, Doctor) with sidebar nav
and integrated Chat panel powered by OpenClaw agent (--local).

- Home: status, agents overview, recommended recipes, recent activity
- Recipes: browse, preview diff, apply with params
- Settings: model profiles CRUD, chat model selection, provider catalog
- Doctor: diagnostics with auto-fix
- Chat: OpenClaw agent integration with session persistence,
  agent selector, read-only advisory context injection
- Progressive data loading to avoid UI blocking
- API key resolution from OpenClaw agent auth-profiles
- Model catalog from openclaw CLI with cache

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:16:38 +09:00