Repository navigation
Commit 0570f79
feat(app-server): new-session UX — guidance, config inheritance, sidebar sync (#10)
* feat(app-server): new-session UX — guidance, config inheritance, sidebar sync
Improve the brand-new-conversation experience in the Flutter remote-control UI:
- Empty state: a new conversation now shows a guidance view (title + four
tappable, remote-control-flavored starter prompts: explore the project,
run/fix tests, review changes, plan a feature) instead of a bare hint.
Tapping a card prefills + focuses the composer. Localized in en + zh.
- Config inheritance: the model / permission mode / plan mode / reasoning
effort the user last chose are remembered per service
(sessionDefaultsProvider) and seeded into each new conversation, instead of
resetting to hard defaults.
- Sidebar sync: a new session is inserted into the left conversations pane the
instant thread/start returns (newest-first), and its message preview is
preserved through the thread/list reconcile so it never flickers to
"(untitled)".
Review-driven hardening: per-service defaults (a model picked on one service
can't leak onto another), reset a stale plan toggle on a fresh conversation,
and drop a seeded reasoning effort the seeded model doesn't support.
Tests: +3 widget tests (mode inheritance, new session appears with its
preview, guidance card prefills the composer); existing empty-state
assertions updated to the guidance view.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
* feat(app-server): unify session UI — conversations sidebar, pickers, cards
Bring the whole app-session experience onto one soft-card design language
(matching the new-session guidance cards):
Conversations sidebar:
- soft rounded rows (icon + preview + relative-time subtitle), time grouping
(Active / Today / Earlier), refined selected + running states, a circular
"new conversation" button, a project chip, and a search box that appears
once there are enough conversations.
Pickers (model / permission / effort):
- a shared _optionSheet: drag handle + title + soft option rows (icon + label +
description), the selected one filled with a check.
Conversation cards:
- tool / grouped-tool / file-change cards become soft bordered cards with an
accent icon and chevron-expand; the approval card becomes a neutral soft
card; the implement bar + error banner become floating rounded cards. The
plan card was already on-style.
i18n: relative-time strings, group labels, search hint, picker titles (en + zh).
Tests: +3 (time grouping, search filter); existing picker/sidebar tests updated
to the new widgets. analyze clean, 81 tests pass.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
* fix(app-server): conversation scroll — no blank on open, edge scrollbar
- Opening a content-heavy conversation showed a blank / mid-content view until
the user scrolled: a tall, variable-height ListView lays out lazily over
several frames, so the single post-frame jump used a stale maxScrollExtent.
_scrollToEnd(force) now re-jumps to the bottom across frames until the extent
settles, so a long conversation opens at the latest message.
- The conversation scrollbar floated at the centred 820px column's edge
(mid-window). The scroll area is now full-width (content centred via
horizontal padding) so the scrollbar sits flush at the window edge, and a
shared thin/rounded scrollbarTheme makes it subtle like a modern web chat.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
* fix(app-server): stable conversation scrollbar via SuperListView
The conversation thumb jumped/resized while scrolling a long session: a
plain ListView.builder estimates total scroll extent from a running average
of the laid-out rows' heights, and this transcript mixes very short rows
(message bubbles, one-word "done" replies) with very tall ones (command /
code / output cards, a compacted dump, a huge markdown list). As differently
sized rows enter and leave the viewport, that average — and thus
maxScrollExtent, the thumb's denominator — lurches, so the thumb size and
position jump instead of tracking the drag.
Swap ListView.builder for SuperListView.builder (super_sliver_list): it keeps
the same lazy virtualization and ScrollController but derives the scroll
extent from per-item estimates reconciled against each row's real height as
it passes the cache area, so maxScrollExtent stays stable and the thumb is
smooth and 1:1 draggable. Two cleanups land in the same edit: hoist the
`_rows` getter (was re-scanned for itemCount and again per itemBuilder =
O(n^2) per build) into one local, and give each row a stable ValueKey so the
extent table tracks rows across streaming upserts and group transitions.
`_MessageView` / `_GroupedActivityCard` gain super.key so the keys compile.
The settle() loop, _atBottom math, jump-to-latest FAB, and the single
SelectionArea are left untouched. Dependency pinned to 0.4.1 (MIT, pure-Dart,
all platforms); the buggy-on-desktop animateToItem/ListController path is
deliberately avoided.
Verified: analyze clean, 81/81 tests pass, and on the live Windows app the
thumb keeps a constant size and advances proportionally across the whole
range — including scrolling through the tall markdown block — and drags 1:1;
the long conversation still opens at the latest message (no blank).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
* fix(app-server): bundle Noto Sans SC for even Chinese on desktop
Chinese rendered with Flutter's default fonts looks thin and unevenly weighted
on Windows: with no declared CJK font the OS picks a fallback face per
glyph-run and synthesizes weights. Bundle Noto Sans SC (SIL OFL 1.1) and make
it the app's primary family on desktop so 中文 and Latin share one
evenly-weighted typeface.
Desktop-only by design: the ~17 MB font would be dead weight on mobile, whose
OS CJK fonts (iOS PingFang SC, Android Noto Sans CJK) already render Chinese
well. The font is declared ONLY in pubspec-desktop.yaml (a copy of pubspec.yaml
plus a fonts: block); the default pubspec.yaml omits it, so Android/iOS/test
builds never bundle it. The 3 desktop release jobs copy the desktop manifest
over pubspec.yaml before building; the 2 mobile jobs are untouched.
- lib/src/fonts.dart: shared font config. isDesktop is gated on
defaultTargetPlatform (NOT dart:io) so `flutter test` — which forces the
platform to android — takes the mobile branch and never references the
desktop-only family.
- theme.dart: fontFamily = Noto Sans SC on desktop, null (system) on mobile,
plus a CJK fallback chain (PingFang SC / Noto Sans CJK / Microsoft YaHei).
- 10 monospace code/diff/command/markdown styles gain a CJK fallback so
Chinese-in-code renders in a real face while ASCII stays monospaced.
- release.yml: app-windows/linux/macos swap in pubspec-desktop.yaml.
- AGENTS.md: documents the two-manifest scheme + local preview command.
Engine caveat (unchanged): Flutter on Windows uses grayscale AA, not ClearType
(flutter/flutter#63043), so CJK still reads marginally softer than a native
Win32 app — but the thin/uneven weight (the reported complaint) is fixed.
Verified: analyze clean, 81/81 tests pass (default no-font manifest), and on the
live Windows app (desktop manifest) the new-session cards and title render in
Noto Sans SC with even, properly-weighted strokes.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
---------
Co-authored-by: Claude Opus 4.8 <[email protected]>1 parent 26ba763 commit 0570f79
18 files changed
Lines changed: 1974 additions & 371 deletions
File tree
- .github/workflows
- apps/flutter
- assets/fonts
- lib
- l10n
- gen
- src
- screens
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
| |||
160 | 167 | | |
161 | 168 | | |
162 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
163 | 174 | | |
164 | 175 | | |
165 | 176 | | |
| |||
255 | 266 | | |
256 | 267 | | |
257 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
258 | 273 | | |
259 | 274 | | |
260 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
177 | 203 | | |
178 | 204 | | |
179 | 205 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 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 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
146 | 178 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
146 | 178 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
901 | 901 | | |
902 | 902 | | |
903 | 903 | | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
904 | 1042 | | |
905 | 1043 | | |
906 | 1044 | | |
| |||
0 commit comments