Commit Graph
2 Commits
Author SHA1 Message Date
Danny White d458429081 fix(studio): clarify pipeline validation feedback (#52055)
## Problem

Pipeline review shows validation failures below the cost estimate, far
from the settings that need changes. Publication-loading failures also
appear in several places with conflicting retry instructions.

## Solution

Attach full-width errors and warnings to their Connection or Data
sections. Keep the current scroll position and show description-only
guidance above the footer. Consolidate publication-loading failures into
one Data-step error with Continue to retry, preserving the existing
sheet behaviour.

_The main fix, spreading out the error and warnings to their respective
sections:_

| Before | After |
| --- | --- |
| <img width="1280" height="1522" alt="New Pipeline Supabase"
src="https://github.com/user-attachments/assets/36df1814-e73f-4440-b338-79b672431c60"
/> | <img width="1280" height="1522" alt="15619"
src="https://github.com/user-attachments/assets/08e39cdd-0e69-4318-b992-dfa81ad8a6c2"
/> |
| _All at bottom_ | _Attached to each section_ |

_Misc fixes for API blocks:_

| Before | After |
| --- | --- |
| <img width="1516" height="1350" alt="CleanShot 2026-10-21 at 15 19
24@2x"
src="https://github.com/user-attachments/assets/56ac9cf7-9c30-4129-8fbc-2708f35a51b9"
/> | <img width="1520" height="1232" alt="CleanShot 2026-10-21 at 15 22
56@2x"
src="https://github.com/user-attachments/assets/c4f4b039-38de-4af0-9bb9-b487ff6ddb63"
/> |

## To test

1. Enable **Pipeline creation wizard** in Feature Previews and open
`/project/<ref>/database/pipelines/new`. Complete Connection and Data to
reach Review.
2. In Chrome DevTools → Network, right-click a captured POST ending
`/replication/<ref>/destinations/validate` (Connection) or
`/replication/<ref>/pipelines/validate` (Data), then select **Override
content**. Reach Review before enabling the destination override. Keep
HTTP status **200** and save:

```json
{"validation_failures":[{"name":"Test validation issue","reason":"Test failure for the review screen.","failure_type":"critical"}]}
```

3. Click **Start pipeline**. Expect a flush Admonition at the bottom of
the matching section and danger guidance above the footer, without
automatic scrolling. Change `critical` to `warning` to check warning
guidance and **Start pipeline anyway**. Edit and retry to confirm values
persist.
4. On Data, block the GET ending
`/replication/v2/<ref>/sources/<id>/publications/<name>`. Expect one
flush publication-loading failure above the footer, including with
Advanced settings open. **Continue** retries; remove the block and retry
to recover.
5. Check desktop and phone widths. Stop before confirming creation, then
remove overrides and request blocks.
2026-10-22 00:07:06 +00:00
Danny White 25ede7243e feat(studio): validate pipeline wizard data settings (#51821)
## Problem

The pipeline wizard lets users reach Review without a valid publication
or initial-sync selection. This is a slice of #49243, following the
merged #51818.

## Solution

- Refresh publication metadata on **Continue** and reject unavailable
publications or removed initial-sync tables.
- Validate initial-sync and advanced data settings, reveal invalid
fields and preserve values for retry.
- Block browser-history shortcuts to Review after data settings change.

| Normal State | Error State (Expanded) |
| --- | --- |
| <img width="1486" height="1010" alt="CleanShot 2026-10-16 at 13 18
25@2x"
src="https://github.com/user-attachments/assets/74ec0785-3bd4-407a-aa3c-7fe69c338488"
/> | <img width="1506" height="2516" alt="CleanShot 2026-10-16 at 13 21
27@2x"
src="https://github.com/user-attachments/assets/6193d8c4-ab9d-47ca-9d9d-1a31198145d1"
/> |

Pipeline creation and navigation-out guards remain for later slices.
**Start pipeline** stays disabled.

## Review instructions

1. Open the [Pipelines
preview](https://studio-staging-git-dnywh-featpipeline-data-validation-supabase.vercel.app/dashboard/project/_/database/pipelines),
select a test project and enable **Pipeline creation wizard**. Open the
[wizard
preview](https://studio-staging-git-dnywh-featpipeline-data-validation-supabase.vercel.app/dashboard/project/_/database/pipelines/new),
choose a destination, then enter credentials and test the connection to
reach Data.
2. Click **Continue** without a publication. Check the field error.
Select a publication, choose a selective initial-sync mode and leave its
table selection empty. Check Continue requires at least one table.
Select a table and confirm you can reach Review.
3. Return to Data. Enter a negative **Batch wait time** under **Advanced
settings**, collapse it and click Continue. Check it reopens with the
error. Correct it and continue, then use browser Back, change a data
setting and try browser Forward. Check you stay on Data until you click
Continue again.
4. For a stale-selection check, select an initial-sync table, remove it
from the publication in another tab, then click Continue. Check the
selection is rejected and your other values remain. A failed metadata
request should also keep values and allow retry with Continue.
2026-10-19 10:32:09 +11:00