Skip to content

refactor(entry): consolidate application bootstrap entry point into main.tsx (Closes #737) - #817

Open
stayzappy wants to merge 1 commit into
Nanle-code:masterfrom
stayzappy:feature/issue-737-entry-point-consolidation
Open

refactor(entry): consolidate application bootstrap entry point into main.tsx (Closes #737)#817
stayzappy wants to merge 1 commit into
Nanle-code:masterfrom
stayzappy:feature/issue-737-entry-point-consolidation

Conversation

@stayzappy

Copy link
Copy Markdown

Objective & Overview

Closes #737

This Pull Request consolidates the application bootstrap path in stellar-dev-dashboard into a single canonical, strictly-typed entry point (src/main.tsx).


Key Changes Made

  1. Canonical Bootstrap Entry Point (src/main.tsx):

    • Converted src/main.jsx -> src/main.tsx with strict TypeScript types (ReactDOM.Root, HTMLElement, BootstrapResult).
    • Implemented environment capability validation (validateEnvironment) to verify modern browser APIs (fetch, localStorage, Promise) and prevent silent execution failures in legacy environments.
    • Implemented DOM container resolution (bootstrapApp): gracefully falls back to an emergency container (createFallbackContainer) if #root is missing from the DOM.
    • Guaranteed monitoring (initMonitoring) runs prior to React mounting.
  2. Entry Script Update (index.html):

    • Updated <script type=module src="/src/main.jsx"></script> -> <script type=module src="/src/main.tsx"></script>.
  3. Automated Unit Tests (src/__tests__/main.test.tsx):

    • Primary flow: Mounts cleanly to existing #root element.
    • Boundary case: Dynamically constructs styled fallback root container when #root is missing.
    • Failure case: validateEnvironment throws descriptive error when mandatory browser APIs are absent.
  4. Architecture Documentation (docs/architecture/entry-points.md):

    • Documented application lifecycle, bootstrap steps, environment validation, and error recovery handling.

Verification

  • npm run test:unit -- src/__tests__/main.test.tsx -> 4 / 4 Unit Tests Passed (100% Success).

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

@stayzappy is attempting to deploy a commit to the nanle-code's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@stayzappy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Manuelshub

Copy link
Copy Markdown
Collaborator

@stayzappy Please fix all the CI checks failure!

@Manuelshub

Copy link
Copy Markdown
Collaborator

@stayzappy Please fix CI checks failure!!!

1 similar comment
@Manuelshub

Copy link
Copy Markdown
Collaborator

@stayzappy Please fix CI checks failure!!!

@stayzappy
stayzappy force-pushed the feature/issue-737-entry-point-consolidation branch 3 times, most recently from df94da7 to 36414a0 Compare August 31, 2026 09:31
@stayzappy
stayzappy force-pushed the feature/issue-737-entry-point-consolidation branch from 36414a0 to e7ef122 Compare August 31, 2026 17:41
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.

[2026 Hardening] Consolidate the application entry points

2 participants