Commit Graph

641 Commits

Author SHA1 Message Date
Taylor Ho
8cf10d3e3c chore: bump file size limits for hooks with optimistic updates 2026-05-22 00:15:48 -07:00
Taylor Ho
0b72f1a72f fix: pass context to single-add mutation so reuse guard fires
The single-agent create path was calling createChannelManagedAgent
without context, so the reuse guard (findReusablePersonaAgent) never
fired — always spawning a new keypair + process. Now fetches
managedAgents + channelMemberPubkeys before calling create, matching
the batch path's behavior.
2026-05-21 23:06:58 -07:00
Taylor Ho
4bb06b8aed feat: sort sidebar bots online-first, then alphabetical
Adds a sortedBots memo in MembersSidebar that prioritizes online
agents at the top. Within each presence group (online vs not-online),
agents sort alphabetically by display name. No more recency-based
reordering — the list stays stable.
2026-05-21 22:34:35 -07:00
Taylor Ho
c65fd6e2b0 feat: optimistic remove — agent vanishes instantly from sidebar
Mirror of the attach optimistic update. onMutate filters the member
out of the cache immediately, rolls back on error, invalidates on
settle to reconcile with server.
2026-05-21 19:54:51 -07:00
Taylor Ho
af3028628c feat: optimistic member updates + decompose QuickAddAgentPopover
- Add optimistic onMutate to useAttachManagedAgentToChannelMutation
  (instant member insertion, rollback on error)
- Add onSuccess cache-set to create/batch mutations (member appears
  as soon as server confirms, before invalidation round-trip)
- Decompose QuickAddAgentPopover (816→271 lines) into:
  - useQuickAddAgentItems.ts (data fetching + item list building)
  - useQuickAddAgentActions.ts (handlers + multi-select state)
  - QuickAddAgentItemRow.tsx (memoized item row component)
- Fix ARIA: remove conflicting role="menu" on container, add
  role="group" with aria-label for keyboard navigation wrapper
- Fix dead team toggles: filter out teams whose members are all
  already in the channel
2026-05-21 19:48:14 -07:00
Taylor Ho
aa6b1f1e31 revert: remove debounce/spring, back to simple motion layout 2026-05-21 19:18:28 -07:00
Taylor Ho
2f378cb7c3 fix: debounce item list (300ms) so name + membership changes batch into one animation 2026-05-21 19:18:28 -07:00
Taylor Ho
ac7727d531 fix: remove frozen-order code, use layout animation for reorder, in-channel agents sort to top 2026-05-21 19:18:28 -07:00
Taylor Ho
4944671516 fix: use ref-based frozen key order — bulletproof stable item positions while popover is open 2026-05-21 19:18:28 -07:00
Taylor Ho
7038c4cbf9 fix: prepend newly created agents to top of list instead of appending 2026-05-21 19:18:28 -07:00
Taylor Ho
abdb683638 fix: popover stays open after add/remove, items don't reorder while open 2026-05-21 19:18:28 -07:00
Taylor Ho
79f59d45ac fix: opacity-70 → opacity-50 on in-channel agent avatar + label 2026-05-21 19:18:27 -07:00
Taylor Ho
90fa35ec04 fix: opacity-70 on in-channel agent avatar + label, X stays full opacity 2026-05-21 19:18:27 -07:00
Taylor Ho
29681d3ca4 feat: add X remove button for in-channel agents in quick-add popover 2026-05-21 19:18:27 -07:00
Taylor Ho
aafe5c2302 fix: increase section spacing in AddChannelBotDialog (space-y-5 → space-y-6) 2026-05-21 19:18:27 -07:00
Taylor Ho
d8e29de06b revert: restore AddChannelBotDialog to pre-branch state (remove progressive disclosure changes) 2026-05-21 19:18:26 -07:00
Taylor Ho
c2c62fa893 fix: deselect team toggle when individual agents are unchecked 2026-05-21 19:17:31 -07:00
Taylor Ho
31778487f0 fix: remove opacity-50 on inactive avatars — looked disabled 2026-05-21 19:17:31 -07:00
Taylor Ho
cb848348d7 fix: remove running tag, use opacity-50 on inactive agent avatars instead 2026-05-21 19:17:31 -07:00
Taylor Ho
7c96f87f3a fix: badge mask border-background → border-popover to match popover surface 2026-05-21 19:17:30 -07:00
Taylor Ho
3d09cd9d92 fix: Add button px-3 → px-1 2026-05-21 19:17:30 -07:00
Taylor Ho
cae7f6ec2a fix: Add button pb-1.5 → pb-1 2026-05-21 19:17:30 -07:00
Taylor Ho
a6074150eb fix: bump More options button py-2 → py-2.5 2026-05-21 19:17:30 -07:00
Taylor Ho
16dc0094d0 fix: reduce bottom padding on floating Add button 2026-05-21 19:17:30 -07:00
Taylor Ho
bcc45872b1 fix: remove gap-2.5 from row, animate marginRight on checkbox, wrap content in gapped div — no extra left padding when checkbox hidden 2026-05-21 19:17:30 -07:00
Taylor Ho
6481789bd3 fix: team filter row always mounted — animate height continuously, no mount/unmount jank 2026-05-21 19:17:29 -07:00
Taylor Ho
8e6608c174 fix: checkbox animates width continuously instead of mount/unmount — no more jank on exit 2026-05-21 19:17:29 -07:00
Taylor Ho
30e7097ff3 feat: animated checkbox with layout transitions, absolute Add button with gradient, remove 's' animation and border-2 2026-05-21 19:17:29 -07:00
Taylor Ho
7b4c1de075 fix: border-2 on subtle toggle pressed state 2026-05-21 19:17:29 -07:00
Taylor Ho
b01411543d Add bg-primary/10 to subtle toggle selected state, fix row spacing
- Subtle variant pressed: bg-primary/10 tint behind the colored border
- Toggle row: pt-0.5 pb-1 to balance spacing (was more above than below)
2026-05-21 19:17:29 -07:00
Taylor Ho
d5f3db1291 fix: colored border-primary on subtle toggle pressed state, reduce toggle row py 2026-05-21 19:17:29 -07:00
Taylor Ho
cb7b83b85a feat: add subtle toggle variant (outline-only state change), use it for team chips at h-6 2026-05-21 19:17:28 -07:00
Taylor Ho
afa4abd3dd Move team toggles to own row between header and list with layout animation
- Toggles sit in a separate row that slides in/out (height animation)
- Agent list uses motion layout to smoothly translate down when row appears
- Header stays clean: just title + Select/Cancel button
- Gradient scroll affordance on the toggle row's right edge
2026-05-21 19:17:28 -07:00
Taylor Ho
f15c436cd2 Fix 's' animation: opacity only, no width transition
The width:0→auto animation caused the 's' to render broken.
Just fade it in with opacity — it's one character, doesn't need
a width transition.
2026-05-21 19:17:28 -07:00
Taylor Ho
b682fb70e2 Keep title visible, toggles to the right, gradient scroll affordance
- 'Add agent' title stays visible always; 's' fades in when select mode
  activates ('Add agents')
- Team toggles appear to the right of the title, scroll horizontally
- Right-edge gradient (from-popover to-transparent) hints at more
  content when overflowing
2026-05-21 19:17:28 -07:00
Taylor Ho
df7838496c Rethink: Select button always outline, label toggles Select/Cancel, default toggle colors
- Button stays ghost+border (outline look) in both states
- Label changes: 'Select' → 'Cancel' when active
- Toggle chips use default data-[state=on]:bg-primary (removed accent override)
2026-05-21 19:17:28 -07:00
Taylor Ho
5bad647f11 Fix button hierarchy: toggles use accent, Select uses secondary
Three primary buttons competing looked unfocused. New hierarchy:
- Add (N) button: primary (the CTA)
- Toggle chips selected: bg-accent (visible but not competing)
- Select button active: secondary (subtle elevation, not primary)
2026-05-21 19:17:27 -07:00
Taylor Ho
1054ca6959 fix: remove extra py-1.5 on team-chips container causing header height shift in select mode 2026-05-21 19:17:27 -07:00
Taylor Ho
c1717da6a4 Match Toggle height to Button sm (h-8) for visual parity 2026-05-21 19:17:27 -07:00
Taylor Ho
e0a5b25d7c fix: match header right padding to top padding on Select button 2026-05-21 19:17:27 -07:00
Taylor Ho
e0045b476b Polish: first team fades only, 2nd+ translate+fade; fix header padding
- First team chip: opacity-only animation (no x translate)
- Second+ chips: translate from x:12 + fade, staggered by index
- Header container: px-3 py-1.5 with gap-2 for consistent spacing
  around the Select button on all sides
2026-05-21 19:17:27 -07:00
Taylor Ho
596c6323bd Restore checkbox without animation — static div, no motion 2026-05-21 19:17:27 -07:00
Taylor Ho
dcf0655330 Remove agent checkboxes from select mode, keep it clean
Checkboxes were too busy in the agent list. Selection is now
indicated only by the bg-accent/50 highlight on selected rows.
Button already uses size=sm.
2026-05-21 19:17:26 -07:00
Taylor Ho
ff513e9cdc Fix Select button: ghost+border for transparent bg, no bg-background clash
The outline variant includes bg-background which creates a visible
contrast block against bg-popover. Use ghost variant with explicit
border-input border for a truly transparent-bg outlined button.
2026-05-21 19:17:26 -07:00
Taylor Ho
f54727e57b Fix Select button: keep label as 'Select', use outline variant for visibility
- Label stays 'Select' in both states (no more 'Cancel' label)
- Inactive: variant='outline' (visible against bg-popover)
- Active: variant='default' (primary) for clear state change
- Popover uses bg-popover token (hsl 220 23% 95% light / 232 23% 18% dark)
2026-05-21 19:17:26 -07:00
Taylor Ho
a3b425db4e Polish: secondary→primary Select button, animated checkboxes, truncation fix
- Select button uses Button variant='secondary', switches to 'default'
  (primary) when active for clear visual state change
- Checkboxes animate in with fade + scale (motion.div) when entering
  select mode
- Agent name uses min-w-0 + truncate for proper text overflow when
  checkbox pushes content over
2026-05-21 19:17:26 -07:00
Taylor Ho
85da5ddee1 Fix: stay in select mode when deselecting agents, stagger toggle animation
- Remove auto-exit from select mode when selectedKeys empties — only
  Cancel button exits select mode now.
- Stagger team Toggle animations: first chip fades in immediately,
  subsequent chips delay by index * 50ms for a fan-out effect.
2026-05-21 19:17:26 -07:00
Taylor Ho
917398f302 Use Toggle for team chips, move Add button below More Options
- Team chips now use shadcn Toggle component (outline variant) with
  visual pressed state via data-[state=on]
- Toggles are selectable/deselectable — clicking again removes the team
- 'Select' button becomes 'Cancel' when active — clears all selections
  and exits select mode
- 'Add (N)' button moved to the bottom of the popover, below More Options
- Full-width button, only visible when items are selected
2026-05-21 19:17:26 -07:00
Taylor Ho
2e09796e9c Add Select button with animated team chips to popover header
- 'Select' button in the header reveals team filter chips on click
- Title fades out, team chips animate in from right using motion/react
- Clicking a team chip auto-selects all its member agents
- Multi-select mode shows checkboxes + 'Add (N)' confirm button
- Single-click fast path preserved when not in select mode
- Team chips scroll horizontally when overflowing
- Exiting: deselect all returns to default title state
2026-05-21 19:17:25 -07:00
Taylor Ho
3acc220679 Reshape AddChannelBotDialog with progressive disclosure
Restructure the dialog from a flat wall of fields into three layers:

1. Primary (always visible): Persona/team selection + runtime picker.
   These are the two decisions that matter most.

2. Customize (collapsed): Bot name, system prompt, respond-to allowlist.
   Power user controls that don't block the happy path.

3. Advanced (collapsed): Backend provider selection, provider config.
   Expert territory hidden by default.

Uses a simple DisclosureSection component with chevron toggle. All
existing functionality preserved — just layered behind progressive
disclosure. Description updated to match the new vibe.
2026-05-21 19:17:25 -07:00