Skip to content

fix(ui): add visual error toast notification for corrupted share links#816

Open
tirth707 wants to merge 8 commits intoaccordproject:mainfrom
tirth707:fix-share-link-error-ui
Open

fix(ui): add visual error toast notification for corrupted share links#816
tirth707 wants to merge 8 commits intoaccordproject:mainfrom
tirth707:fix-share-link-error-ui

Conversation

@tirth707
Copy link
Copy Markdown

Closes #801

This PR improves the initialization User Experience (UX) by ensuring that corrupted, malformed, or expired shared workspace links do not cause silent UI failures. It introduces a global error listener to provide immediate visual feedback to the user while safely loading the default playground state.

Changes

  • Imported the message component from antd in App.tsx.
  • Implemented a React useEffect hook to listen to the global Zustand error state.
  • Configured the listener to trigger a visual toast notification specifically when the store registers a "Failed to decompress" error during the loadFromLink sequence.

Flags

  • The loadFromLink function within the Zustand store catches decompression errors internally and pushes them to the Problems panel rather than throwing them back up to the App.tsx initialization catch block. Monitoring the global store error state was the most non-intrusive way to hook into this failure without rewriting the store's internal error handling logic.

Screenshots or Video

Screenshot 2026-03-12 at 8 16 40 PM Screenshot 2026-03-12 at 8 18 01 PM

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

Signed-off-by: tirth707 <ptirth2206@gmail.com>
@tirth707 tirth707 requested a review from a team as a code owner March 12, 2026 14:48
Copilot AI review requested due to automatic review settings March 12, 2026 14:48
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 12, 2026

Deploy Preview for ap-template-playground ready!

Name Link
🔨 Latest commit 3de5945
🔍 Latest deploy log https://app.netlify.com/projects/ap-template-playground/deploys/69c941e929972700081ee6bb
😎 Deploy Preview https://deploy-preview-816--ap-template-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves Template Playground startup UX by surfacing a visual Ant Design toast when a shared workspace link cannot be decompressed during initialization, instead of failing silently.

Changes:

  • Added Ant Design message toast notification for a specific share-link decompression failure.
  • Subscribed to Zustand global error state via a useEffect listener.
  • Switched the AI config selector to useStoreWithEqualityFn(..., shallow) to reduce rerenders from object selectors.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/App.tsx
Comment thread src/App.tsx
Comment thread src/App.tsx
…or corrupted links

Signed-off-by: tirth707 <ptirth2206@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/App.tsx Outdated
Comment thread e2e/share.spec.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


You can also share your feedback on Copilot code review. Take the survey.

Comment thread e2e/share.spec.ts Outdated
Signed-off-by: tirth707 <ptirth2206@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: tirth707 <ptirth2206@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.


You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/App.tsx Outdated
Comment thread src/App.tsx
Comment thread src/App.tsx
Comment thread e2e/share.spec.ts
Copilot AI review requested due to automatic review settings March 29, 2026 15:14
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread src/App.tsx
Comment thread src/App.tsx
Comment thread e2e/share.spec.ts
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions Bot added the Stale label Apr 16, 2026
@tirth707
Copy link
Copy Markdown
Author

Hey please don't close this PR

@github-actions github-actions Bot removed the Stale label Apr 17, 2026
@mttrbrts
Copy link
Copy Markdown
Member

Thanks for this contribution! Before we can merge, all commits need to be signed off for the Developer Certificate of Origin.

Please run:

git rebase HEAD~N --signoff  # where N = number of commits
git push --force-with-lease

See CONTRIBUTING.md for details.


This comment was generated by AI on behalf of @mttrbrts.

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.

Bug: App fails silently without UI feedback when loading corrupted share links

3 participants