feat(ui): every export-target refusal reads as prose - #808
Merged
Conversation
JArmandoAnaya
force-pushed
the
feat/targets-closeout-frontend
branch
from
August 26, 2026 14:03
e88f09b to
01ce88e
Compare
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
The frontend half of the export-targets closeout. Two refusal codes the export dialog could receive had no sentence in the shared vocabulary and fell through to the server's raw message, and the three family headings the target picker and the recipe editor print were kept in two hand-written maps over the same wire enum. Together with the companion backend pull request (
feat/targets-closeout-backend) this completes the epic.What changed
Every export-target refusal reads as prose.
EXPORT_TARGET_CONFLICTandINVALID_EXPORT_TARGETare the two 500s a misdeclared export plugin raises: two installed plugins claiming one target name, and a plugin declaring a target whose geometries its own exporter never writes. Neither is a rule the person broke, sofrontend/ui-core/src/data/refusals.tsnow gives each a sentence that says where the problem is and what helps — remove one of the two plugins, or check the installed export plugins. Two forced-refusal tests indataset.test.tsxdrive each code through the export dialog and assert the prose renders while the code itself is absent from the DOM; both fail without the entries. The withheld-codes list indata/capabilities.test.tsnames neither code, so it needed no change.One table names the export-target families.
ExportTargetSelect.tsxkeptFAMILY_HEADINGSplus anOTHER_HEADINGandRecipeEditor.tsxkeptFAMILY_WORDS, two maps over the same serverfamilystring. They are now one exportedEXPORT_TARGET_FAMILIEStable with aheading(over a group, plural) and aword(beside one target) per row, andexportTargetFamily(family)resolves a family to its row with the last row as the catch-all. The select groups through it and the editor'stargetSubtitlereads itswordfrom it. The headings the docs quote underdocs/content/ui.mdare unchanged.One user-visible wording changed: a family the build has no row for. The select already placed such a target under Other formats; the editor printed the raw wire string (
some-new-family) beside it. Both now read the same catch-all row, so the editor says Other format for it. The three named families print exactly as before.Found, not fixed
Nothing outside the two files named above was touched. The
familystring onExportTargetOutis open on the wire (no enum inopenapi.json), so the table's catch-all remains the only place an unknown family gets a name; a served family list would let both the select and the editor drop the hardcoded rows, but that is a wire change and not part of this closeout.Test plan
The two new tests were proven to bite by stashing the
refusals.tsentries:Closes #784