Commit 4d09797
improve: polish hub title bar, notifications, and chat UI (#1041)
* feat: add native lifecycle slash commands
Handle exact /new, /reset, and /compact commands through lifecycle RPCs, preserve structured compaction boundaries, and retain safe compatibility behavior for older gateways.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c41e789a-73e3-41ae-ac62-1ff5287599c0
* improve(hub): move Settings nav item to footer under Diagnostics
Match the WinUI standard of pinning Settings to the very bottom of the
navigation pane. Moves the Settings NavigationViewItem out of MenuItems
into FooterMenuItems, placed after Diagnostics. Navigation still resolves
via both collections and the high-contrast icon swap already covers footer
items, so behavior is unchanged.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* improve(chat): make welcome suggestion buttons subtle
Drop the default button stroke and elevation depth from the three
zero-state prompt suggestions (Say hi, What can you do?, Give me a quick
tour of OpenClaw), keeping only a light, low-opacity fill at rest via
SubtleFillColorSecondaryBrush. Rounded corners, padding, and hover
feedback are unchanged.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Make chat composer theme-aware in dark mode
The composer read as light gray on a dark chat surface and its fade
gradient stayed white because FunctionalUI resolved theme brushes by
walking the app-level ThemeDictionaries, which do not surface WinUI's
XamlControlsResources framework brushes. Controls rendering dark fell
back to the light Application.Resources snapshot.
Fixes, using only built-in WinUI theme resources (no hardcoded colors,
no C# theme helper):
- App.xaml: re-declare the exact framework brush keys the chat uses in
the Default/Light/HighContrast theme dictionaries, each aliasing its
built-in color token via ThemeResource. Values are identical but now
reachable by the per-theme walk, so they flip correctly.
- FunctionalUI: resolve foreground/background/border resource brushes
against the control's ActualTheme and re-apply reactively on
ActualThemeChanged/Loaded so brushes flip on a runtime light/dark
switch.
- Composer: send/stop glyphs and fills, session-picker rows, and the
welcome suggestion buttons resolve against ActualTheme instead of
snapshotting the app theme; the fade gradient derives from the
now-correct base-surface brush so it fades into the dock in dark.
- Timeline: timestamp/helper captions resolve TextFillColorSecondary
for the timeline root's ActualTheme so they stay legible in dark.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix: harden lifecycle command edge cases
Preserve explicit session selection and failed composer sends, retain live entries during authoritative reloads, widen compaction metrics, and clarify lifecycle timeout recovery.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c41e789a-73e3-41ae-ac62-1ff5287599c0
* improve(hub): restyle title bar and float notification banner
Merge the pane toggle into the lobster logo (hover reveals a DockLeft
panel icon), move the back button to a chevron directly left of a
centered search box, and give the title-bar icon buttons a subtle
hover/pressed affordance.
Make the right-side status/error pill transparent at rest (border kept
for its dropdown) and the notification bell a true borderless subtle
button. Convert the app notification banner to a native WinUI InfoBar
with Title/Message and a standard ActionButton, and float it over the
top-right of the content area (right ~2/5) so it never pushes the title
bar or nav content down. Long messages wrap and grow the banner taller.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix: order lifecycle commands with queued sends
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c41e789a-73e3-41ae-ac62-1ff5287599c0
* fix(functionalui): resolve theme color via paired brush token
ResolveColor threw InvalidOperationException when a raw WinUI color token was absent, which happens in minimal hosts (including the UI test surfaces) that seed only the paired '<key>Brush'. The chat timeline resolves TextFillColorSecondary during render, so the throw aborted the whole mount and the timeline rendered no ItemsRepeater, failing the chat proof tests. Fall back to the paired brush's color before throwing; both forms resolve to the same value in production. Adds a regression test covering the brush-color fallback and the still-missing-token throw.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix(chat): eliminate ActualThemeChanged handler accumulation in .Set() lambdas
Replace 7 repeated event subscriptions inside .Set() render paths with:
- Theme.EnsureThemeCallback: ConditionalWeakTable-based single-subscription
utility that stores and replaces the latest callback per control, invoking
it immediately and on theme/load events (once, never accumulating).
- FunctionalUI modifier path (.BackgroundResource / .Background(Ref(...))):
for constant resource keys on Borders and Buttons, reuse the existing
TrackThemedBrushes mechanism which already guards first-time subscription.
- Control.Background support in ApplyModifiers + ReapplyThemedBrushes: the
narrow renderer extension needed for Button backgrounds.
Also remove the dead RootGrid Row 1 (formerly the InfoBar, now floating
in Row 1 as an overlay).
Regression tests prove:
- 100 EnsureThemeCallback calls store exactly one callback (latest state)
- FunctionalUI renderer applies BackgroundResource to Controls correctly
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 103120e9-d856-456c-885c-1ffd529b8746
* fix(chat): render composer fade gradient dark in dark mode
The composer scrim derived its color by reading .Color off the framework
SolidBackgroundFillColorBaseBrush out of the visual tree, so its
{ThemeResource} re-resolved against the ambient light app theme and the
fade read white (#F3F3F3) on a dark page.
Add a dedicated ChatComposerFadeBrush to App.xaml ThemeDictionaries with
literal per-theme colors (dark #202020, light #F3F3F3, high-contrast
follows SystemColorWindowColor) and resolve it as a whole brush per
ElementTheme, so it flips correctly and stays aligned with the composer
dock fill. App-defined theme dictionaries are reachable by the
FunctionalUI theme walk; framework primitives are not.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix: guard authoritative history reload pending by connection generation
The _authoritativeHistoryReloadPending flag was consumed in
LoadHistoryCoreAsync's finally block without checking whether the
completing request belonged to the current connection generation.
A stale old-generation completion after disconnect/reconnect could
consume the flag and trigger an unintended authoritative reload
in the newer generation.
Fix:
- Only consume/schedule the pending authoritative reload when
requestConnectionVersion == _historyConnectionVersion (same
guard as _historyInFlight removal)
- Clear _authoritativeHistoryReloadPending in
AdvanceHistoryGenerationLocked so generation advances invalidate
stale pending flags
- Add deterministic regression test:
StaleGenerationAuthoritativeReload_DoesNotReloadInNewGeneration
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d2982ca8-bb56-4728-85bd-29542ce9d554
* Record paired-review history race fix
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f0e93ff-d320-454d-b00a-865dac727d0c
---------
Co-authored-by: Caleb Eden <58373773+calebeden@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Scott Hanselman <scott@hanselman.com>1 parent 2fb1da2 commit 4d09797
10 files changed
Lines changed: 747 additions & 164 deletions
File tree
- src
- OpenClaw.Tray.WinUI
- Chat
- Windows
- OpenClawTray.FunctionalUI
- tests
- OpenClaw.Tray.Tests
- OpenClaw.Tray.UITests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
23 | 49 | | |
24 | 50 | | |
25 | 51 | | |
26 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
27 | 66 | | |
28 | 67 | | |
29 | 68 | | |
30 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
31 | 83 | | |
32 | 84 | | |
33 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
678 | 711 | | |
679 | 712 | | |
680 | 713 | | |
681 | 714 | | |
| 715 | + | |
682 | 716 | | |
683 | 717 | | |
684 | 718 | | |
| |||
881 | 915 | | |
882 | 916 | | |
883 | 917 | | |
884 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
885 | 922 | | |
886 | 923 | | |
887 | 924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1004 | 1004 | | |
1005 | 1005 | | |
1006 | 1006 | | |
1007 | | - | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1008 | 1015 | | |
1009 | 1016 | | |
1010 | 1017 | | |
| |||
3006 | 3013 | | |
3007 | 3014 | | |
3008 | 3015 | | |
3009 | | - | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
3010 | 3021 | | |
3011 | 3022 | | |
3012 | 3023 | | |
0 commit comments