SIGN IN SIGN UP

fix(canvas): make a new card one gesture, and a box-select leave text alone

"New conversation" no longer opens a submenu of folders. One click puts a draft
card on the board, in the workspace's active folder or in a folderless chat when
there is none — the same answer the tab strip's own button gives without asking.
The active id is re-resolved against the folder list first, since a folder can
be closed while its id is still the active one, and Cmd/Ctrl+N comes through the
same resolver rather than hardcoding chat mode. The card's folder chip stays
editable until the first message, so this is a starting point, not a commitment.

Box-select still dragged a text selection through the cards. Refusing the anchor
on the pane falls short in both directions: a subtree that opts back in — a card
body, or a form control through the UA stylesheet — is selectable again, and
refusing the anchor also refuses the side effect nobody notices until it is
gone, since pressing on blank space is what collapses the PREVIOUS selection. A
selection made inside a card therefore stayed lit however much empty board was
clicked afterwards, which reads as the very bug it was there to fix. A
pane-initiated left press now collapses the selection outright and marks the
surface for the length of the drag, hard-disabling selection across it; dragging
inside a card still selects its text. The mark comes off on the primary button's
mouseup, on a move with no button held (released outside the window), on blur
and on unmount — left behind, it would make the board permanently unselectable.

Zoom moved out of the dock into its own pill in the bottom-right corner, with
circled glyphs: the dock's contents shift as the selection changes, and its plus
was the same glyph as "add to canvas" one row along. The dock folds against the
board's measured width now instead of the viewport's, because this route sits
beside the workspace sidebar — `100vw` overstates the room by the whole sidebar
and let the centred strip run under the pill.

A collapsed card's title had a line and a half to live in, and since line-clamp
clips to the box rather than to whole lines, the second line came out sliced
through the middle. The box is a fixed 132px while its padding, leading and
metadata rows are all rem, so the app's zoom eats the title's budget — and
leaves the same card looking over-padded at 100%. Padding and leading are
tighter, each row carries its own line-height (a 10px model name's line box is
taller than the icons beside it and would otherwise set the row's height), and
the slack belongs to the footer's `mt-auto` rather than to a `flex-1` title, so
the title gets two full lines and the folder and branch are the last to give.
CARD_HEIGHT is untouched: it is also the region grid's row unit.
X
xintaofei committed
c7139f95d64a50bcf8e332490b6e3018709e4e93
Parent: a71be92