Repository navigation
fix(ui): Fix hook state, status styling and destructive confirms - #300
Merged
Merged
Conversation
CodeEditor and Map read the raw theme setting, so a system theme on a dark OS got the light editor. Four DataTable entry points each copied the store setup and only one synced a changed pageSize, and Autosearch's debounce called the onSearch from an earlier render. Editor and map now follow the provider's resolved theme, one shared hook builds and syncs the DataTable store, and Autosearch reads its callbacks through a ref.
Three helpers unwrapped Zod schemas with different wrapper sets, and required detection looked only at the outer type, so an optional field with .transform() was reported required and constraints behind a pipe were lost. One unwrapSchema helper now walks optional, nullable, default, catch, readonly and pipe wrappers by def.type, and all three use it. Constraint extraction no longer relies on instanceof against the zod peer and also reads string min and max length.
The disabled, content and placeholder effects only checked the editor for null, so they called setEditable, getHTML and view.dispatch on a destroyed Tiptap instance and threw when StrictMode re-ran effects. Each effect and the onUpdate handler now return early when editor.isDestroyed is set.
Finished refactors left a legacy DataTable context, internal shims and barrels, a committed v0.2 build artefact under test/, and comments that point at another repo or at tickets nobody can open. Typography and the assistant copy action also wrote to the clipboard by hand, threw on insecure origins and gave no feedback. Delete what nothing imports, deprecate the public DataTableContextValue type, and route both copy actions through useCopyToClipboard.
Warning and info toasts reused the error and success colours, so status was colour only, and FormCopyBox faded its value to 3.26:1 contrast. Destructive MoreActions items ran on the first click, and native Button sizes fell under the 44pt touch target. Toasts now use muted palette tokens with a labelled status icon while message keeps its look, and FormCopyBox uses theme tokens that pass 4.5:1. MoreActions items take an optional confirm step built on Dialog, and native Button gets a default hitSlop that reaches 44pt without changing its size and keeps its disabled state announced.
mattdjenkinson
approved these changes
Nov 12, 2026
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.
Problem
CodeEditor and Map ignored a
systemtheme, the DataTablepageSizeprop synced in only one of four entry points, Autosearch's debounce called a staleonSearch, and the form helpers marked optional fields with.transform()as required. RichTextEditor threw when React re-ran its effects after the editor was destroyed, which crashes the notes editor in cloud-portal. Warning and info toasts reused the error and success colours with no icon, FormCopyBox faded its value to 3.26:1 contrast, destructive MoreActions items ran on the first click, and native Button sizes fell under the 44pt touch target.Solution
Each of the five commits fixes one area and carries tests and changesets. Warning and info toasts take muted colours from existing palette tokens, every status toast shows a labelled icon, and plain
toast()looks the same as before.ActionItemgains an optionalconfirmstep built onDialog, which MoreActions, DataTable row actions and GroupedTable row actions all honour. Native Button gets a defaulthitSlopthat reaches 44pt without changing its size. The cleanup commit deletes legacy DataTable context, internal shims and a committed build artefact without removing any public export, and deprecatesDataTableContextValue.Consumers will see three behaviour changes. A changed server-side
limitprop now resets the table to page 1 and refetches. Fields wrapped in.catch(),.readonly()orz.preprocess()start from an empty value instead ofundefined. When a confirmed action'sonClickrejects, the dialog stays open and swallows the error, so the action should report its own failure.Closes #299
Closes #297
Closes #298