Repository navigation
Conversation
kmcginnes
force-pushed
the
tanstack-form-query-editor
branch
from
November 18, 2026 00:31
752c4e5 to
ccccc62
Compare
Frees the components/form import path, which resolved to Form.tsx on case-insensitive filesystems. Layer: 1-tanstack-form-query-editor
Layer: 1-tanstack-form-query-editor
Layer: 1-tanstack-form-query-editor
The query editor was its last user. FormItem and FormError, the layout helpers older fields still use, move to their own files. Layer: 1-tanstack-form-query-editor
Layer: 1-tanstack-form-query-editor
Adds asChild to form.SubmitButton and the field.InputGroup parts it sits in. Layer: 1-tanstack-form-query-editor
kmcginnes
force-pushed
the
tanstack-form-query-editor
branch
from
November 25, 2026 00:43
ccccc62 to
697dd2d
Compare
This branch has not been deployed
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.
Summary
Form handling is split today: one form runs on react-hook-form, and every other input uses hand-rolled state and validation. This PR adds TanStack Form with Zod as the one form layer, moves the query editor onto it, and removes react-hook-form.
User-facing: the query editor's Submit button now sits in a strip inside the text box's border instead of floating over the text. The button stays keyboard-focusable while a query runs. The box can still be dragged taller.
Each field part takes the same props as the shadcn primitive it wraps. Parts named
Field*drop the prefix (Fieldisfield.Wrapper); every other part keeps its name.field.Wrappershares ids with its parts, so the bound control fills inid,name,value,onChange,onBlur,aria-invalid, and anaria-describedbythat lists only the description and error on the page. A bound part used outsidefield.Wrapperthrows.docs/agents/react.mdnow makesuseAppFormwith a Zod schema the rule for all user input, in a submit mode or an auto-save mode.docs/adr/20261110-tanstack-form-and-zod-for-user-input.mdrecords the decision. Submit mode usesrevalidateLogic()withvalidators.onDynamic, because plainvalidators.onSubmitdoesn't show an error again when a value turns invalid after a failed submit.Evidence
Before: the Submit button floated over the text box's bottom-right corner and became natively disabled while a query ran, which dropped keyboard focus to the page.
After:
New tests (agent-tested) cover the field parts' ids,
aria-describedby,data-invalidin both states, and the throw outsidefield.Wrapper. A query editor test presses Cmd+Enter twice while a query runs and expects one request.Verified live (agent-tested): in Chrome and Safari against a public SPARQL endpoint: Cmd+Enter and Ctrl+Enter each send one query, plain Enter adds a newline, the Submit click sends one query, and focus stays on Submit while the query runs. Repeat clicks and shortcuts during a run send nothing. The text and results survive switching sidebar tabs, Cancel works, and dragging the box taller grows the group.
Merge Danger
Door: two-way
Impact: query editor
The query editor is the only screen that changes. Removing react-hook-form touches no other screen:
FormItemandFormErrorkeep their markup in their new files. No saved data, config, or URL is involved.Related
🤖 Written by an AI agent on my behalf.