Skip to content

fix(shared-issues): Use hard navigation for Details link to prevent missing org context - #128735

Open
sentry[bot] wants to merge 2 commits into
masterfrom
seer/fix/shared-issue-details-hard-navigation
Open

sentry[bot] wants to merge 2 commits into
masterfrom
seer/fix/shared-issue-details-hard-navigation

Conversation

@sentry

@sentry sentry Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Problem

When viewing a shared issue at /share/issue/:shareId/, the user is typically unauthenticated or outside the target organization's membership. The shared view renders under a local, minimal OrganizationContext.

Previously, the "Details" button in SharedGroupDetails used a React Router <Link to={group.permalink}>. Clicking it triggered an in-app client-side SPA transition to /issues/:groupId/. This unmounted SharedGroupDetails (and its local OrganizationContext) before the target route had an authenticated org context loaded. Because org API calls returned 401s for unauthenticated users, child components in the issue details view called useOrganization() without {allowNull: true}, which threw Error: useOrganization called but organization is not set.

Fix

Replace the React Router <Link> with a standard anchor tag (<a href={group.permalink}>) so clicking "Details" performs a full page reload instead of an in-app transition. This allows the application to cleanly bootstrap authentication and organization context: authenticated members load their org context properly, while unauthenticated users are directed to the login page as expected.

Verification

  • pnpm run lint:js static/app/views/sharedGroupDetails/index.tsx (passes, 0 errors/warnings)
  • pnpm run test static/app/views/sharedGroupDetails/index.spec.tsx (all tests pass)

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes JAVASCRIPT-3FSD

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@sentry
sentry Bot requested review from a team as code owners October 24, 2026 10:55
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 24, 2026

This branch was successfully deployed

1 active deployment
Preview — ef713725 Deployed Oct 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants