Skip to content

Conversation

@Bekiboo
Copy link
Collaborator

@Bekiboo Bekiboo commented Jan 7, 2026

Description of change

Fixes a UI crash on Safari iOS 16 when opening the Charter.

  • Removed a hardcoded http://localhost fallback causing mixed-content errors in production
  • Transpiled markdown-related client dependencies to avoid unsupported RegExp syntax in Safari 16
  • Added browserslist config to define supported Safari/iOS targets

This prevents JS execution from failing and keeps the Charter flow usable on iOS 16.

Issue Number

Closes #636

Type of change

  • Fix (a change which fixes an issue)

How the change has been tested

Changes not tested yet

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

  • New Features

    • Maintenance banner notifications can now be dismissed and remain dismissed during your session.
  • Chores

    • Updated browser compatibility targets to support Safari 16+, iOS 15+, and other modern browsers.
    • Enhanced compatibility with markdown processing libraries.

✏️ Tip: You can customize this high-level summary in your review settings.

@Bekiboo Bekiboo self-assigned this Jan 7, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

Browser compatibility and transpilation settings are configured for Safari 16+ support. Next.js environment types are updated. The MaintenanceBanner component is corrected to properly fetch and display maintenance status data on mount.

Changes

Cohort / File(s) Summary
Browser & Build Configuration
platforms/group-charter-manager/.browserslistrc, platforms/group-charter-manager/next-env.d.ts, platforms/group-charter-manager/next.config.ts
Added browserslist targets (iOS ≥15, Safari ≥15, last 2 versions). Added TypeScript reference to Next.js route types. Added transpilePackages config for 'marked' and '@milkdown/preset-gfm' to ensure Safari 16 compatibility.
MaintenanceBanner Component Fix
platforms/group-charter-manager/src/components/MaintenanceBanner.tsx
Added isDismissed state. Modified fetchMotd to require NEXT_PUBLIC_REGISTRY_URL (no fallback) with early return guard. Fixed useEffect to invoke fetchMotd on mount. Updated status string comparisons to use double quotes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • feat: motd #361: Introduces the MOTD endpoint and maintenance-banner behavior that this PR fully integrates into the component.
  • feat: dismissible banner #364: Modifies the same MaintenanceBanner component with state management and localStorage handling for banner dismissal.

Suggested reviewers

  • coodos

Poem

🐰 Browser walls now built so tall,
Safari's gap shall not enthrall,
Transpiled packages, strong and fleet,
iOS sixteen—now complete!
Maintenance signals, loud and clear, 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main fix: preventing Safari iOS 16 crashes in the charter flow, which is the primary objective of this PR.
Description check ✅ Passed The PR description includes all required sections: change summary, issue number, type of change, testing notes, and completed checklist items.
Linked Issues check ✅ Passed The code changes address all key objectives from #636: removed hardcoded localhost fallback, transpiled markdown packages for Safari 16 RegExp compatibility, and added browserslist config for browser targets.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the iOS 16 Safari crash: browserslist config, next-env types, transpilePackages in next.config, and MaintenanceBanner localhost fallback removal.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@Bekiboo Bekiboo marked this pull request as ready for review January 7, 2026 19:09
@Bekiboo Bekiboo requested a review from coodos as a code owner January 7, 2026 19:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
platforms/group-charter-manager/.browserslistrc (1)

1-8: Minor comment inconsistency with actual targets.

The comment mentions "iOS 16+ Safari support" but the configuration targets iOS >= 15 and Safari >= 15. While this includes iOS 16, the comment could be more accurate to reflect the broader support range being configured.

📝 Suggested clarification
 # Browsers that we support
-# iOS 16+ Safari support
+# iOS 15+ and Safari 15+ support (includes iOS 16 fix)
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0144c4d and 77bf885.

📒 Files selected for processing (4)
  • platforms/group-charter-manager/.browserslistrc
  • platforms/group-charter-manager/next-env.d.ts
  • platforms/group-charter-manager/next.config.ts
  • platforms/group-charter-manager/src/components/MaintenanceBanner.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (3)
platforms/group-charter-manager/next-env.d.ts (1)

3-3: LGTM! Standard Next.js typed routes feature.

This reference enables type-safe routing in Next.js 15+, which is appropriate for your Next.js 15.5.9 installation.

platforms/group-charter-manager/next.config.ts (1)

8-12: Verify the transpilation fixes Safari 16 RegExp errors on a Safari iOS 16 device or simulator.

The approach of using transpilePackages is correct for addressing Safari 16 compatibility issues. Both marked (v16.1.1) and @milkdown/preset-gfm (v7.15.2) are used in the codebase and will be transpiled to avoid unsupported RegExp syntax. The configuration is properly set up in next.config.ts.

Since the PR description notes that "changes have not been tested yet," manual verification on an actual Safari iOS 16 device or simulator is required to confirm:

  1. The "Invalid regular expression: invalid group specifier name" error no longer occurs
  2. The Charter flow opens and functions correctly
  3. No ChunkLoadError is thrown
platforms/group-charter-manager/src/components/MaintenanceBanner.tsx (1)

20-24: [Rewritten comment]
[Classification tag]

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] [iOS 16][Safari] UI breaks after clicking “View Charter”

2 participants