Repository navigation
refactor(web): unify offline/error fallback across pages - #430
Open
gerardoparrajc wants to merge 2 commits into
Open
gerardoparrajc wants to merge 2 commits into
gerardoparrajc wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
Extracts the repeated
if (!x.ok) return x.offline ? <Offline/> : <ErrorNotice/>checkinto a shared
resultFallback(result, prefix?)helper incomponents/offline.tsx, usedacross the projects, project overview, settings, insights, agents, attention and stories
pages. Also routes a real 404 on project settings through
notFound()instead of ageneric
ErrorNotice.Files affected:
apps/web/components/offline.tsx
apps/web/app/(app)/(org)/projects/page.tsx
apps/web/app/(app)/projects/[projectId]/page.tsx
apps/web/app/(app)/projects/[projectId]/settings/page.tsx
apps/web/app/(app)/projects/[projectId]/insights/page.tsx
apps/web/app/(app)/projects/[projectId]/agents/page.tsx
apps/web/app/(app)/projects/[projectId]/attention/page.tsx
apps/web/app/(app)/projects/[projectId]/stories/page.tsx
apps/web/app/(app)/projects/[projectId]/stories/[number]/page.tsx
Persistence/migration/compatibility: none.
Security/permissions: none — presentation-only, no new data exposed.
Cost/budget/observability/analytics/GitHub mirror: none.
Known risks / follow-up: apps/(app)/layout.tsx, projects/[projectId]/layout.tsx, and
(org)/settings/page.tsx were left untouched (different existing semantics, e.g. the
settings page doesn't currently distinguish offline from a real error); tracked as
follow-up, not fixed here to keep this change behavior-preserving.
Release classification: non-breaking, not user-visible (pure refactor).
Verification:
pnpm exec biome check <changed files>— cleanpnpm --filter @facility/sdk build && pnpm --filter @facility/web build— pass