Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused change preserves existing configured behavior and has regression coverage; no blockers were found, though tests were not executed.
No open issues 🎉
What changed in this PR
Addresses #1107 by surfacing missing Terra export configuration instead of silently leaving users on the form.
Changes:
- Throws a descriptive error once the manifest location and request parameters are available.
- Preserves pending and configured behavior.
- Updates documentation and adds four focused tests.
| File | Description |
|---|---|
| tests/useExportToTerraResponseURL.test.ts | Tests missing configuration, pending states, and configured exports. |
| src/hooks/useExportToTerraResponseURL.ts | Throws when a completed request lacks Terra configuration. |
| src/components/Export/components/ExportToTerra/exportToTerra.tsx | Updates JSDoc to describe the error behavior. |
Review effort: Balanced
…porttoterraurl (#1107) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: cc-claude-tools <cc-claude-tools@clevercanary.com>
…porttoterraurl (#1107) use it() in useexporttoterraresponseurl tests and fix terra casing in the hook jsdoc. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
frano-m
force-pushed
the
frano-m/1107-terra-url-error
branch
from
October 22, 2026 04:30
de5fb8f to
4f46fee
Compare
Collaborator
|
Thanks Fran, this is cleanly done. But every app that uses export to Terra sets |
3 tasks
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.
Closes #1107
What changed
useExportToTerraResponseURLnow throwsExport to Terra requires exportToTerraUrl to be set in the site config.once the manifest location and request params are available andexportToTerraUrlis not configured. Before that point it still returnsundefined, so the form renders as before.ExportToTerraJSDoc updated to describe the throw instead of "the form stays".tests/useExportToTerraResponseURL.test.tscovering the missing-config throw, the pending state, the configured URL, and missing request params.Why
Without
exportToTerraUrl, clicking "Request Link" fired the analytics event and the manifest request succeeded, but the user never left the form and nothing reported the misconfiguration. The error now reaches the nearest React error boundary, so the problem is visible.Assumptions I made
AcceptTerraTOSandCreateTerraAccountstill silently no-op on "Go to Terra" whenexportToTerraUrlis unset.fix:, not a breaking change. Apps that configureexportToTerraUrlare unaffected. Apps that render export to Terra withoutexportToTerraUrlwill now see their error boundary after "Request Link" instead of a silently stuck form — setexportToTerraUrlin the site config if you use export to Terra.How to verify
In a consuming app (e.g. data-browser) linked with
scripts/link.sh:exportToTerraUrlset in the site config, go to the export to Terra page, choose a format, and click "Request Link". You should get the Terra link view as before.exportToTerraUrlfrom the site config and restart. The export to Terra form should still render. Click "Request Link": once the manifest returns, the app's error boundary should show, and the console should logExport to Terra requires exportToTerraUrl to be set in the site config.npm test -- tests/useExportToTerraResponseURL.test.tsin findable-ui; all four tests pass.Definition of done:
exportToTerraUrlconfigured, the export to Terra flow throws an error with a message naming the missing config. → step 2exportToTerraUrlconfigured, export to Terra behaves as before. → step 1🤖 Generated with Claude Code
🐦 Built with cc-claude-tools