Skip to content

Report local share validation failures without blaming sign-in - #1351

Merged
thesiti92 merged 2 commits into
devdotfast:mainfrom
mfahadkh00:codex/explain-share-validation-failures
Oct 22, 2026
Merged

thesiti92 merged 2 commits into
devdotfast:mainfrom
mfahadkh00:codex/explain-share-validation-failures

Conversation

@mfahadkh00

Copy link
Copy Markdown
Contributor

When a saved review contains metadata the portable share validator cannot read, ShareClient.create fails before contacting the hosted service. The publishing host currently replaces that exception with “Sharing failed. Check your connection and login, then retry,” sending users back through sign-in even when their credentials are valid.

Classify local bundle-validation failures as SharePreflightError, using the existing HTTP 422 handling to show a preparation error that asks the user to report the issue. The original exception remains available as an error cause; raw validation details are not exposed in the response.

Related to #1289, which already includes the origin.baseBranch schema fix. I reproduced a named-base export failing on current main and passing with that one-line schema change. This PR addresses the remaining misleading-error path for incompatible saved data.

The regression test publishes a review containing unsupported origin metadata and verifies the response, zero hosted requests, no publication callback, and an unchanged saved login. Existing success, Git-verification, and expired-token tests still pass.

Validation:

  • Sharing suite: 8 files, 47 tests passed.
  • Final publishing regression run: 5 tests passed.
  • Backend TypeScript check, root pnpm lint, pnpm format, and git diff --check passed.
  • Full pnpm run ci was attempted with the required Node 24.18.0 and pnpm 11.1.2. Desktop dependency bootstrap exhausted local disk space before the full suite could run. Generated Code OSS dependencies were removed, then the publishing tests and backend typecheck passed again.

@thesiti92 thesiti92 self-assigned this Oct 22, 2026
@thesiti92

Copy link
Copy Markdown
Contributor

thanks for the contribution! ill get this merged soon. we're also working to revamp share so you can view them in browser so stay tuned for that :)

Agent-Session: e05d0ee1-ebec-4824-922f-319222ec3817
Agent-Session: e8809ee0-b788-4f9d-a2e1-0cc7df5810e0
Agent-Session: d378b298-4d50-49a2-8569-c9143af1de5f
Agent-Session: 3b69532b-b299-4476-8f76-f025671a4a44
Agent-Session: 23dfa6c6-9dcd-4b6d-a1f1-92c1a9513386
Agent-Session: 5375f3cc-3ab7-4c80-a744-51c661db9638
Agent-Session: 470db778-c191-40f3-98a1-b4d661e0aff9
@thesiti92
thesiti92 merged commit 905e176 into devdotfast:main Oct 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants