[eric] canvas: double-click to frame everything keeps a readable floor instead of bottoming out at 15%

This commit is contained in:
ciregenz
2026-08-07 16:04:42 -07:00
parent 5b63c98854
commit 9b0ca9f2fc
@@ -6,6 +6,7 @@ import { isAgentDrivenBrowser } from '@/shared/isAgentDrivenBrowser';
import { expandSession } from '@/shared/state/agentsSlice';
import { bringToFront } from '@/shared/state/dashboardLayoutSlice';
import { setScrollFocusedCard } from '@/shared/cardScrollFocus';
import { REVEAL_MIN_ZOOM } from '../../canvas/revealZoom';
import type { CardType, useDashboardSelection } from '../state/useDashboardSelection';
import type { useCanvasControls } from './useCanvasControls';
@@ -228,7 +229,9 @@ export function useDashboardInteractions({
report('dashboard', 'canvas_double_clicked');
// Double-tap on empty space = show me everything (Eric's call): the same animated fit the
// overview affordances use, instead of the old blind 0.55x zoom-out that just lost people.
canvas.actions.fitToView();
// Floored like tidy and reveal, because unfloored it clamped at MIN_ZOOM and a spread-out canvas
// landed at 15%, every card a postage stamp. That is the same "lost people" this was meant to fix.
canvas.actions.fitToView(REVEAL_MIN_ZOOM);
}, [canvas.actions]);
// Double-click a card → always expand + center + zoom (cancels pending collapse from single-click)