8000 fix: query editor hang, MCP startup warning, and 1.7.3 maintenance by dmux · Pull Request #12 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

fix: query editor hang, MCP startup warning, and 1.7.3 maintenance - #12

Merged
dmux merged 7 commits into
mainfrom
fix/misc-fixes
Aug 22, 2026
Merged

dmux merged 7 commits into
mainfrom
fix/misc-fixes

Conversation

@dmux
@dmux dmux commented Aug 22, 2026 •
Copy link
Copy Markdown
Owner

Two user-facing bugs, plus the maintenance that piled up behind them. Released as 1.7.3.

Fixes

The Query editor could hang on "Loading…" forever. The page gated its first tab on a hydrated flag set from zustand persist's onRehydrateStorage. With synchronous localStorage that callback runs inside create(), while the useEditorTabsStore binding is still in its temporal dead zone — and zustand swallows the resulting ReferenceError in its own sync-thenable catch. So the flag never flipped, nothing was logged, and anyone with no persisted tabs (fresh browser, cleared site data, or having just closed the last tab) got a blank page that reloading could not fix.

The signal now comes from React, via the useIsMounted hook this codebase already had. The gate is still needed — zustand hands React getInitialState() as the server snapshot and persist pins that to the pre-rehydration state, so the hydration render sees an empty tab list regardless — but useIsMounted cannot get stuck, and it also makes the first client render agree with the static export's prerendered markup, removing a latent hydration mismatch.

MINILAKE_MCP=1 printed a pydantic-settings warning before the banner. FastMCP's own Settings annotates lifespan with a forward reference to FastMCP, defined further down the same module, so pydantic-settings >= 2.15 warns about the unresolved reference on every instantiation. The model is now rebuilt once the SDK module is fully imported — which is exactly what the warning asks for. There is no SDK upgrade to take instead: mcp 1.29.0 is the last of the 1.x line, and 2.0 is the FastMCP -> MCPServer rewrite this project deliberately pins away from.

Maintenance

  • Python 3.14 in the images and CI, up from 3.11 (bugfix support ended April 2024). requires-python stays >=3.11 — this changes what minilake runs on, not what it can be installed into. .python-version aligns local development with the image.
  • Web UI dependencies — Next 16.3.2, recharts 3.10.1, lucide-react 1.33, shadcn 4.19, TypeScript 6 — and the transitive dompurify pin lifted to 3.4.14, which closes the four DOMPurify Dependabot alerts on this repo. Worth knowing: monaco-editor vendors its own copy of DOMPurify into the bundle actually served, and never calls the APIs those advisories hinge on, so this cleans the dependency graph rather than the shipped bytes.
  • Python lock — twenty patch/minor moves, notably databricks-sdk 0.133.0, starlette 1.6.0, uvicorn 0.52.4, deltalake 1.6.3.

ESLint stays on 9 and TypeScript on 6 on purpose: eslint-plugin-react still calls the context.getFilename() removed in ESLint 10, and typescript-eslint refuses TS 7.0 outright. Both are upstream blocks.

Verification

  • Full Docker suite green at every step: 265 passed, including two new regression tests (ui/src/stores/__tests__/editor-tabs.test.ts, tests/mcp_server/test_build.py) — both confirmed red without their fix.
  • UI: pnpm test (32), typecheck, lint, build.
  • Browser, against a container built from this branch: cleared localStorage now opens a Query 1 tab instead of hanging; closing the last tab reopens one immediately; reload restores tabs with no duplicate and no console error; results grid and Chart tab render on the updated recharts.
  • Runtime image: boots on Python 3.14.7 with MINILAKE_MCP=1, clean logs, SQL and the MCP handshake both working.
  • No known vulnerabilities: pnpm audit clean, and pip-audit plus an OSV query across all 147 locked Python packages.

dmux added 7 commits August 21, 2026 21:45
The editor replaced the whole page with "Loading…" until a `hydrated` flag
flipped, and that flag never flipped. It was set from zustand persist's
`onRehydrateStorage`, which with synchronous localStorage runs inside
`create()` — while the `useEditorTabsStore` binding is still in its temporal
dead zone. The ReferenceError was swallowed by zustand's own catch, so the
page stayed on "Loading…" forever with no console output whenever there were
no persisted tabs: a fresh browser, cleared site data, or right after closing
the last tab.

Take the signal from React instead, via the existing `useIsMounted`. The gate
is still needed — zustand hands React `getInitialState()` as the server
snapshot and persist pins that to the pre-rehydration state, so the hydration
render sees an empty tab list either way — but `useIsMounted` cannot get
stuck, and it also makes the first client render match the static export's
prerendered markup.

Claude-Session: https://claude.ai/code/session_01Ryg8gi4GMwXgLFQMMJ85Jc
Clears four DOMPurify advisories (GHSA-cmwh-pvxp-8882, GHSA-55q2-fjhq-7xh7,
GHSA-vxr8-fq34-vvx9, GHSA-c2j3-45gr-mqc4), all fixed in 3.4.13. They come in
through monaco-editor, which pins dompurify to an exact 3.4.8 and has no newer
release, so the pin is lifted with a pnpm override. Note this only cleans the
dependency graph: monaco vendors its own copy of DOMPurify under
esm/vs/base/browser/dompurify/, and that is what ends up in the AMD bundle we
serve. It never calls the APIs the advisories hinge on (IN_PLACE, setConfig,
clearConfig, CUSTOM_ELEMENT_HANDLING).

Also bumps next 16.3.2, recharts 3.10.1, lucide-react 1.33, shadcn 4.19,
@types/node 26 and typescript 6.

eslint stays on 9 and typescript on 6 deliberately: eslint-plugin-react 7.37.5
(via eslint-config-next) still calls the `context.getFilename()` removed in
ESLint 10, and typescript-eslint refuses TS 7.0 outright, supporting only
<6.1.0. Both are upstream blocks, not preferences.

Claude-Session: https://claude.ai/code/session_01Ryg8gi4GMwXgLFQMMJ85Jc
Starting with MINILAKE_MCP=1 printed an IncompleteFieldDefinitionWarning
before the banner. FastMCP's own `Settings` annotates `lifespan` with a
forward reference to `FastMCP`, which is defined further down the same module
and so is unresolved when the model is built; pydantic-settings >= 2.15 warns
about that on every instantiation.

Rebuild the model once the module is fully imported, which is exactly what the
warning asks for. There is no SDK upgrade to take instead: mcp 1.29.0 is the
last of the 1.x line and 2.0 is the rewrite this project pins away from.

Claude-Session: https://claude.ai/code/session_01Ryg8gi4GMwXgLFQMMJ85Jc
The images and CI were on 3.11, which left bugfix support in April 2024 and
now only gets security patches. Move both to 3.14, the current stable.

`requires-python` stays at ">=3.11" on purpose: this changes what minilake
*runs* on, not what it can be installed into, so nobody on an older
interpreter is cut off. The 3.14 classifier is added alongside the existing
ones.

Verified before switching: every binary dependency has wheels covering 3.14
(duckdb and pyarrow ship cp314, deltalake and cryptography ship abi3), and the
full Docker suite passes on the new image with no new failures.

Claude-Session: https://claude.ai/code/session_01Ryg8gi4GMwXgLFQMMJ85Jc
Twenty patch/minor moves from `uv lock --upgrade`, the notable ones being
databricks-sdk 0.133.0, starlette 1.6.0, uvicorn 0.52.4, deltalake 1.6.3,
pyarrow 25.0.1 and ruff 0.16.4. No majors, and no pyproject floors change.

Not a security fix: pip-audit over the environment and an OSV query across all
147 locked packages (both extras plus the dev group) came back clean either
way. mcp stays on 1.29 — 2.0 is the FastMCP -> MCPServer rewrite this project
deliberately pins away from.

Claude-Session: https://claude.ai/code/session_01Ryg8gi4GMwXgLFQMMJ85Jc
The images and CI moved to 3.14, but a contributor's `uv sync` still picked
whatever interpreter it found first — here that was 3.12, so local runs and the
image disagreed. `.python-version` closes that gap; uv downloads 3.14 on its
own if it is missing.

`requires-python` still says ">=3.11", so installing minilake into an older
interpreter is unaffected. This only governs the development environment.

Claude-Session: https://claude.ai/code/session_01Ryg8gi4GMwXgLFQMMJ85Jc
Fixes and maintenance. No API changes.

The query editor could hang on "Loading…" for anyone with no persisted tabs,
and MINILAKE_MCP=1 printed a pydantic-settings warning before the banner. Both
are fixed.

Alongside those: the images and CI move to Python 3.14 (requires-python stays
at >=3.11), the web UI dependencies are updated with the transitive dompurify
pin lifted, and the Python lock takes twenty patch/minor moves.

Claude-Session: https://claude.ai/code/session_01Ryg8gi4GMwXgLFQMMJ85Jc
@dmux dmux self-assigned this Aug 22, 2026
@dmux dmux added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Aug 22, 2026
@dmux
dmux merged commit fa44c67 into main Aug 22, 2026
3 checks passed
@dmux
dmux deleted the fix/misc-fixes branch September 30, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0