Skip to content

Commit df6b9fd

Browse files
committed
fix: command timeline crushed to scrollbar height on fresh browsers
1 parent 28e834d commit df6b9fd

3 files changed

Lines changed: 51 additions & 9 deletions

File tree

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,24 @@ was designed almost entirely through this panel — including the print-design f
213213

214214
**[Live demo on GitHub Pages](https://seehiong.github.io/blender-mcp-n8n/)**
215215
auto-deployed by [`.github/workflows/deploy-studio.yml`](.github/workflows/deploy-studio.yml)
216-
on every push to `main` that touches `studio/`. There's no Bridge Server to reach
217-
from a Pages-hosted page, so the demo link always launches in Demo Mode.
218-
219-
Running Studio anywhere else (locally, or your own bridge that happens to be down)
220-
behaves differently on purpose: the header shows **"Offline"** and a
221-
**"▶ Try Demo Mode"** button — demo mode is opt-in there, never automatic, so a
222-
genuinely offline bridge is never silently mistaken for a working connection.
216+
on every push to `main` that touches `studio/`.
217+
218+
> [!NOTE]
219+
> **The connection check always runs in *your* browser, against `localhost`
220+
> never against the page author's machine.** Studio's connection probe
221+
> (`studio/src/lib/api.js`) always targets `http://localhost:8008` (then `:8000`),
222+
> regardless of where the Studio page itself is hosted. So:
223+
> - If **you** have your own Bridge Server running locally, the hosted Pages demo
224+
> will genuinely connect to it and drive **your own** Blender instance — hosting
225+
> the UI once on Pages doesn't require running it locally too.
226+
> - If you **don't** have a bridge running, the header shows **"Offline"** and a
227+
> **"▶ Try Demo Mode"** button appears. Demo mode is always opt-in, never
228+
> automatic — a genuinely offline bridge is never silently mistaken for a
229+
> working connection.
230+
>
231+
> Either way, no one visiting the Pages demo can ever reach *another visitor's*
232+
> Blender instance — the browser only ever talks to `localhost` on the machine
233+
> it's running on.
223234
224235
Either way, once in Demo Mode:
225236
- Loads a static tool catalog (`studio/src/lib/demoTools.js`) so the guided forms,

studio/src/App.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ export default function App() {
4141
// §7.3: bottom Command Timeline dock — vertical axis, inverted (dragging
4242
// the handle up should grow the dock, which is the opposite sign of a
4343
// raw clientY delta since the dock is anchored to the bottom).
44-
const timeline = useResizableSidebar({ storageKey: 'timelineHeight', axis: 'vertical', invert: true, minWidth: 100, maxWidth: 400, defaultWidth: 160 });
44+
// min/default must fit title bar + ActionBar + the SVG diagram (~98px with
45+
// 2 branch rows) — the old 100/160 values crushed the diagram to just its
46+
// scrollbar on any browser with fresh localStorage, which looked like a
47+
// rendering bug. The hook clamps stored values on load, so stale
48+
// too-small heights persisted in existing browsers self-heal to >= min.
49+
const timeline = useResizableSidebar({ storageKey: 'timelineHeight', axis: 'vertical', invert: true, minWidth: 220, maxWidth: 520, defaultWidth: 300 });
4550

4651
const [session, setSession] = useState(null);
4752
const [filter, setFilter] = useState('');

studio/src/style.css

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,29 @@ body:has(.sidebar-resize-handle.vertical.dragging) {
158158
cursor: row-resize;
159159
}
160160

161+
/* Visible grab affordance for the dock divider: a centered grip pill on top
162+
of the full-width line, so the resizable edge is discoverable instead of
163+
an invisible 6px strip. */
164+
.sidebar-resize-handle.vertical::before {
165+
content: '';
166+
position: absolute;
167+
top: 1px;
168+
left: 50%;
169+
transform: translateX(-50%);
170+
width: 44px;
171+
height: 4px;
172+
border-radius: 4px;
173+
background: var(--text-secondary);
174+
opacity: 0.5;
175+
transition: background 0.15s ease, opacity 0.15s ease;
176+
}
177+
178+
.sidebar-resize-handle.vertical:hover::before,
179+
.sidebar-resize-handle.vertical.dragging::before {
180+
background: var(--accent-color);
181+
opacity: 1;
182+
}
183+
161184
/* Action bar: playback transport + branch run, docked below the header,
162185
always visible regardless of sidebar scroll position (§7.4). */
163186
/* §7.5: the ActionBar is docked directly under the Command Timeline's
@@ -1694,7 +1717,10 @@ footer {
16941717

16951718
.command-timeline-dock .command-tree-scroll {
16961719
flex: 1;
1697-
min-height: 0;
1720+
/* Never let flexbox crush the diagram to just its scrollbar: the SVG is
1721+
~98px tall with two branch rows. Combined with the dock's raised
1722+
min-height this keeps ticks visible even at minimum dock size. */
1723+
min-height: 110px;
16981724
}
16991725

17001726
.command-tree-scroll {

0 commit comments

Comments
 (0)