Skip to content

fix(web): keep app usable on transient instance fetch failure - #9659

Open
IsmailofficialGithub wants to merge 1 commit into
makeplane:previewfrom
IsmailofficialGithub:fix/9658-instance-maintenance-gate
Open

fix(web): keep app usable on transient instance fetch failure#9659
IsmailofficialGithub wants to merge 1 commit into
makeplane:previewfrom
IsmailofficialGithub:fix/9658-instance-maintenance-gate

Conversation

@IsmailofficialGithub

@IsmailofficialGithub IsmailofficialGithub commented Aug 21, 2026

Copy link
Copy Markdown

Description

Only show the maintenance empty state when /api/instances/ fails and instance data was never loaded. Avoid flipping to the startup error screen on brief API restarts or 502s after a successful load.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

N/A

Test Scenarios

  • Load web app successfully (instance info present)
  • Briefly stop/restart API so GET /api/instances/ fails
  • Confirm app stays usable instead of full maintenance screen
  • Cold start with API down still shows maintenance when no instance data exists

References

Fixes #9658

Summary by CodeRabbit

  • Bug Fixes
    • Improved maintenance-mode handling so available instance data remains visible when background data refreshes encounter an error.
    • Maintenance view now appears only when instance information is unavailable.

Only show MaintenanceView if instance data was never loaded, so brief /api/instances/ failures do not force the startup error screen.

Fixes makeplane#9658
@CLAassistant

CLAassistant commented Aug 21, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d659f5a4-7cb7-44d3-96ac-557a9bfd03e8

📥 Commits

Reviewing files that changed from the base of the PR and between e056bbf and 90178f9.

📒 Files selected for processing (1)
  • apps/web/core/lib/wrappers/instance-wrapper.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

InstanceWrapper now preserves the application view when instance data exists during an SWR error. It renders MaintenanceView only when the error occurs without instance data.

Changes

Instance error handling

Layer / File(s) Summary
Maintenance view condition
apps/web/core/lib/wrappers/instance-wrapper.tsx
The maintenance view now requires both an SWR error and absent instance data.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 90178

This localized fix preserves the usable app state after transient instance-fetch failures while retaining the maintenance screen for cold starts without instance data; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: sriramveeraghanta

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change implements issue #9658 by showing maintenance only when instance data is unavailable.
Out of Scope Changes check ✅ Passed The single-line change is limited to the linked issue and PR objective, with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.
Title check ✅ Passed The title clearly identifies the bug fix and the affected behavior during transient instance fetch failures.
Description check ✅ Passed The description includes all required sections and clearly explains the fix, test scenarios, change type, and related issue.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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]: Instance wrapper shows "didn't start up correctly" on transient /api/instances/ failure

2 participants