Repository navigation
Fix JAML default filter crash, validate before search, make JAML view usable on phones - #4
Conversation
… usable on phones The shipped default filter used two keys the JAML grammar does not have (spectral, mixedJoker). motely-wasm 26 raises an opaque NativeAOT exception on unknown keys instead of a parse error, so the first Start Search on a fresh install died every time. Fix the keys and gate the search on jaml-lang diagnostics: unknown keys now disable Start and show the line. WebMCP publish re-ran once per registered tool and aborted the previous pass, logging an AbortError for every tool on boot. Batch registration notifies once and a superseded publish exits quietly. In JAML mode the navbar was an empty column (desktop) or a full-width void above the editor (phone). Collapse it there and move the view switcher into the header. Seed-queue arrow hotkeys and header controls no longer act while authoring JAML, and loading a seed list no longer yanks the view back to Blueprint. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkbxDfehyheD9RSpWTSDQF
|
CI: the The workflow has one job, A re-run would fail identically, so I have not spent one. Proposed patch (not applied here, since it changes the production deploy path): split the workflow so PRs run the build and only jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
env:
BASE_PATH: /Blueprint/
- uses: actions/upload-pages-artifact@v3
with:
path: './dist'
deploy:
if: github.event_name != 'pull_request'
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/configure-pages@v4
- id: deployment
uses: actions/deploy-pages@v4With that, PRs get a real build check and the Generated by Claude Code |
Greptile SummaryThis PR corrects the shipped JAML filter, prevents invalid JAML from reaching the search engine, improves JAML-mode navigation on narrow screens, isolates seed-queue controls from JAML authoring, and batches WebMCP registry publication.
Confidence Score: 5/5The PR appears safe to merge; no concrete correctness, security, or repository-rule failures remain. The corrected default validates cleanly, invalid documents are prevented from starting while active searches remain cancellable, navigation changes preserve reachable mode transitions, and batched WebMCP publication converges on the complete registry.
|
| Filename | Overview |
|---|---|
| src/components/blueprint/jamlView/JamlView.tsx | Adds diagnostics-driven search validation and preserves cancellation while a worker search is active. |
| src/modules/state/jamlSearchContext.tsx | Corrects and exports the default JAML filter used on first launch. |
| src/components/blueprint/layout/header.tsx | Moves the shared view selector into the header during JAML mode and hides analysis-only controls. |
| src/components/blueprint/standardView/index.tsx | Fully collapses the settings navbar while JAML mode is active. |
| src/components/SeedQueue.tsx | Prevents seed-queue hotkeys from firing while users author JAML. |
| src/modules/state/store.ts | Stops seed-queue navigation from forcing JAML users back to Blueprint mode. |
| src/modules/webmcp/registry.ts | Batches tool registration and unregistration into one registry notification. |
| src/modules/webmcp/register.ts | Makes superseded WebMCP publication loops exit without logging expected abort failures. |
| tests/jamlDefault.spec.ts | Covers the corrected default filter, its clause count, and rejection of the legacy invalid keys. |
| package.json | Promotes the already-resolved jaml-lang package to a direct dependency. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
Edit[Edit JAML document] --> Validate[jaml-lang diagnostics]
Validate -->|Errors| Block[Disable Start Search and show errors]
Validate -->|No errors| Start[Start worker search]
Start --> Engine[motely-wasm search engine]
Engine --> Progress[Progress and scored results]
Progress --> Results[Render matching seeds]
Start -->|User cancels| Cancel[Send cancellation request]
Reviews (1): Last reviewed commit: "Fix JAML default filter crash, validate ..." | Re-trigger Greptile
What was broken
The first Start Search on a fresh install crashed every time. The shipped
DEFAULT_JAMLused two keys the JAML grammar does not have:spectral: Hex(should bespectralCard) andmixedJoker: Any(should bejoker). motely-wasm 26 raises an opaqueC# exception from NativeAOTon unknown keys instead of a parse error, so the UI showed that string and nothing else. Bisected clause by clause in Node; the corrected keys run clean.WebMCP logged an AbortError for every tool on boot.
registerTools()notified once per tool, each notify re-ranpublish(), and each publish aborted the one before it mid-loop. Thirteen warnings per page load.JAML view was unusable on a phone. At 390px the AppShell navbar rendered in flow at full width and, in JAML mode, contained only the view switcher, so the editor started roughly 1500px below the fold. On desktop it was an empty 400px column.
Seed-queue hotkeys and view hijack.
ArrowLeft/ArrowRightstepped seeds while authoring JAML, and loading a seed list forced the view back to Blueprint.What this does
DEFAULT_JAMLand export it.jaml-langdiagnostics (added as a direct dependency; it was already installed as a jaml-ui dependency). Unknown keys disable Start Search and showline N: Unknown key '...'in the Search panel. Cancel still works while a search is running. jaml-ui'sparseJamlnever throws, so it cannot be used as the gate.registerTools()registers the batch and notifies once; a supersededpublish()exits quietly instead of warning per tool.jumpSeedQueueno longer rewritesviewMode.___tests___/jamlDefault.spec.ts: the default filter has zero diagnostics, declares nine should clauses, and the validator rejects the two keys that crashed the engine.Verification
Headless Chromium against the built app:
could not registerwarningsset_jaml_filterline 22: Unknown key 'spectral'.shownNot fixed here, called out for later: ESLint cannot parse files under
___tests___/becausetsconfig.jsononly includessrc(pre-existing, affects the existing specs too), and motely-wasm should return a real parse error instead of the NativeAOT exception.🤖 Generated with Claude Code
https://claude.ai/code/session_01RkbxDfehyheD9RSpWTSDQF
Generated by Claude Code