Skip to content

perf(web): split heavy UI and guarded Tauri modules #192

Description

@Tutitoos

Roadmap reference

Phase 8 - quality hardening and release readiness.

Objective

Reduce the initial web payload and remove Vite ineffective dynamic-import warnings while preserving authenticated web and Tauri desktop behavior.

Scope

  • Lazy-load route- and interaction-specific UI such as administration, conversations, and the rich composer.
  • Keep Tauri APIs outside the ordinary web startup path by using guarded dynamic imports consistently.
  • Add regression coverage for lazy loading and desktop command helpers.
  • Record production build chunk sizes before and after.

Tasks

  • Split heavy UI modules at stable Suspense boundaries.
  • Consolidate guarded Tauri invocation without static core imports.
  • Verify all routes and composer/conversation interactions.
  • Run the complete web, browser, and production-build validation.

Acceptance criteria

  • The initial JavaScript chunk is below the current ~743 kB baseline.
  • The INEFFECTIVE_DYNAMIC_IMPORT warning for @tauri-apps/api/core is gone.
  • Admin, inbox, conversation, composer, authentication, and desktop tests remain green.
  • No new loading-state accessibility regression is introduced.

Validation

  • bun run --cwd apps/web typecheck
  • bun run --cwd apps/web test
  • bun run --cwd apps/web test:e2e
  • bun run --cwd apps/web build
  • Inspect emitted chunk sizes and warnings.

Dependencies

Risks

  • Incorrect lazy boundaries can cause visible flashes or defer runtime errors until interaction.
  • Tauri imports must remain unreachable in ordinary browser sessions.

Exclusions

  • No new product features or visual redesign.
  • No dependency upgrades.
  • No backend protocol changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:webWeb applicationenhancementNew feature or requestjavascriptPull requests that update javascript codepriority:p1High prioritystatus:readyDependencies are actionable and work may start

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions