Repository navigation
The Playwright API mock answers knowledge.formats, so the repository add dialog opens in e2e - #286
Merged
Merged
Conversation
The repository's add dialog reads knowledge.formats when it opens. The mock answered it with its catch-all list shape, so the dialog read an undefined formats list and the page crashed in tracker-ux's add-a-document step. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #157
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
None: a test fixture only.
Why
Since #283, the repository card's "Add a document" dialog reads
knowledge.formatswhen it opens, to badge a picked file. The Playwright API mock (frontend/e2e/fixtures.ts) had no case for that op, so it answered with its catch-all list shape ({rows: [], entries: [], …}). The dialog then readformats.formatsas undefined, and the page fell to the error boundary ("Cannot read properties of undefined (reading 'filter')").tracker-ux.spec.ts's "page, trackers, a linked card, docs" test, desktop and mobile, timed out waiting for the dialog's Title field.Design
knowledge.formatsas a server with the reference extractor does: every known format sorted by name, each with the extensions and media typesserver/core/document_formats.pynames it by andavailable: true, the default 64 MB upload cap, the refused legacy extensions andtextas the default format.formatslist, and a server without the op answers 404, whichknowledgeFormatsalready reads asnull.Scope and risk
Compatibility, rollout and rollback
Tests
E2E_PORT=<port> npm --prefix frontend run e2e -- e2e/tracker-ux.spec.ts: 10 passed. Before the fix, both "page, trackers, a linked card, docs" runs failed on a crashed page.tracker-ux.spec.tsis the only spec that opens an add dialog (the specs searched for the dialog's button names).AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. Checked: the crash in the failing run's page snapshot, and the spec passing with the fixture.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code