Skip to content

ship/fix desktop show native engine provisioning status#6546

Merged
matthewevans merged 2 commits into
mainfrom
ship/fix-desktop-show-native-engine-provisioning-status
Jul 23, 2026
Merged

ship/fix desktop show native engine provisioning status#6546
matthewevans merged 2 commits into
mainfrom
ship/fix-desktop-show-native-engine-provisioning-status

Conversation

@matthewevans

@matthewevans matthewevans commented Jul 23, 2026

Copy link
Copy Markdown
Member
  • fix(desktop): show native engine provisioning status
  • fix(release): recover main bundle and clarify desktop downloads

Summary by CodeRabbit

  • New Features

    • Added a progress overlay showing native engine preparation, downloading, verification, and startup status.
    • Displays helpful details when updates are in progress and clearly reports success or failure.
    • Added localized progress messages in English, German, Spanish, French, Italian, Polish, and Portuguese.
    • Release downloads now use consistent platform-specific installer filenames.
  • Bug Fixes

    • Native engine failures now provide visible feedback instead of ending without status information.
  • Tests

    • Added coverage for native engine progress and readiness states.

@matthewevans
matthewevans enabled auto-merge July 23, 2026 15:25
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The changes add native engine progress reporting and a localized frontend overlay, convert preview-server execution into an explicit workflow dependency, normalize shell release artifacts, adjust release Rust flags, and add a non-debug interaction consistency no-op.

Changes

Release workflow updates

Layer / File(s) Summary
Preview server workflow orchestration
.github/workflows/deploy.yml, .github/workflows/preview-server.yml
The deploy workflow invokes the preview-server workflow with card-data inputs, and build-pages now depends on its completion.
Shell release artifact staging and publishing
.github/workflows/shell-release.yml
Shell artifacts are renamed to fixed platform filenames, while manifests and release uploads reference those exact names.
Release Rust toolchain configuration
.github/workflows/release.yml
Release server jobs explicitly set empty Rust flags during toolchain setup.

Native engine progress UI

Layer / File(s) Summary
Native engine progress contract
client/src-tauri/src/native_engine.rs, client/src/services/nativeEngine.ts
Native engine failures emit a Failed progress phase, and the frontend subscribes to typed Tauri progress events.
Progress overlay lifecycle and localization
client/src/components/chrome/NativeEngineProgressOverlay.tsx, client/src/App.tsx, client/src/i18n/locales/*/common.json
The app displays localized progress, diagnostic details, and terminal ready or failed states through a global overlay.
Progress overlay validation
client/src/components/chrome/__tests__/NativeEngineProgressOverlay.test.tsx
Tests cover downloading progress details and ready-state accessibility behavior.

Interaction debug build handling

Layer / File(s) Summary
Non-debug interaction consistency path
crates/engine/src/game/interaction.rs
The consistency helper uses an explicit no-op implementation when debug assertions are disabled.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant NativeEngine
  participant TauriEventBridge
  participant NativeEngineProgressOverlay
  participant App
  NativeEngine->>TauriEventBridge: emit native-engine-progress
  TauriEventBridge->>NativeEngineProgressOverlay: deliver progress payload
  App->>NativeEngineProgressOverlay: mount global overlay
  NativeEngineProgressOverlay-->>App: render localized phase and detail
Loading

Suggested reviewers: lgray

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change by describing the desktop native engine provisioning status update.
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ship/fix-desktop-show-native-engine-provisioning-status

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
.github/workflows/deploy.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

.github/workflows/preview-server.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

.github/workflows/release.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

  • 8 others

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/deploy.yml:
- Around line 349-361: Replace the broad secrets inheritance on the
preview-server job with an explicit mapping for only CLOUDFLARE_API_TOKEN,
CLOUDFLARE_ACCOUNT_ID, and SERVER_ARTIFACT_MINISIGN_PRIVATE_KEY, sourcing each
from the caller workflow’s corresponding secrets while leaving the existing
preview-server inputs unchanged.

In `@client/src/components/chrome/NativeEngineProgressOverlay.tsx`:
- Around line 75-84: Update the full-screen motion.div in
NativeEngineProgressOverlay to be a non-blocking status surface by adding
pointer-events-none to its styling, allowing pointer interaction with the
underlying app while preserving the existing role, live-region attributes, and
visual overlay behavior.

In `@client/src/services/nativeEngine.ts`:
- Around line 62-63: Update the native-engine progress flow around the listen
call and NativeEngineProgressOverlay so the latest resolving, ready, or failed
state is persisted or queryable and replayed when the overlay mounts. Ensure
subscription is established before provisioning begins where applicable, and
handle any progress event emitted during listener registration so no state is
lost.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ca8e1ae-d302-438a-a36b-7570f6754f8f

📥 Commits

Reviewing files that changed from the base of the PR and between c754a08 and 9f6d467.

📒 Files selected for processing (17)
  • .github/workflows/deploy.yml
  • .github/workflows/preview-server.yml
  • .github/workflows/release.yml
  • .github/workflows/shell-release.yml
  • client/src-tauri/src/native_engine.rs
  • client/src/App.tsx
  • client/src/components/chrome/NativeEngineProgressOverlay.tsx
  • client/src/components/chrome/__tests__/NativeEngineProgressOverlay.test.tsx
  • client/src/i18n/locales/de/common.json
  • client/src/i18n/locales/en/common.json
  • client/src/i18n/locales/es/common.json
  • client/src/i18n/locales/fr/common.json
  • client/src/i18n/locales/it/common.json
  • client/src/i18n/locales/pl/common.json
  • client/src/i18n/locales/pt/common.json
  • client/src/services/nativeEngine.ts
  • crates/engine/src/game/interaction.rs

Comment on lines +349 to +361
preview-server:
name: Publish Preview Server
needs: [card-data]
if: ${{ github.repository == 'phase-rs/phase' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/preview-server.yml
with:
fingerprint: ${{ needs.card-data.outputs.engine_fingerprint }}
commit: ${{ github.event.workflow_run.head_sha || github.sha }}
card_data_sha256: ${{ needs.card-data.outputs.card_data_sha256 }}
card_data_hash16: ${{ needs.card-data.outputs.card_data_hash16 }}
draft_pools_sha256: ${{ needs.card-data.outputs.draft_pools_sha256 }}
draft_pools_hash16: ${{ needs.card-data.outputs.draft_pools_hash16 }}
secrets: inherit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Pass only the secrets required by preview-server.yml.

secrets: inherit exposes every secret available to this workflow to the reusable workflow, although it only consumes CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, and SERVER_ARTIFACT_MINISIGN_PRIVATE_KEY. Replace it with an explicit secret mapping to preserve least privilege.

Proposed fix
-    secrets: inherit
+    secrets:
+      CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+      CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+      SERVER_ARTIFACT_MINISIGN_PRIVATE_KEY: ${{ secrets.SERVER_ARTIFACT_MINISIGN_PRIVATE_KEY }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
preview-server:
name: Publish Preview Server
needs: [card-data]
if: ${{ github.repository == 'phase-rs/phase' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/preview-server.yml
with:
fingerprint: ${{ needs.card-data.outputs.engine_fingerprint }}
commit: ${{ github.event.workflow_run.head_sha || github.sha }}
card_data_sha256: ${{ needs.card-data.outputs.card_data_sha256 }}
card_data_hash16: ${{ needs.card-data.outputs.card_data_hash16 }}
draft_pools_sha256: ${{ needs.card-data.outputs.draft_pools_sha256 }}
draft_pools_hash16: ${{ needs.card-data.outputs.draft_pools_hash16 }}
secrets: inherit
preview-server:
name: Publish Preview Server
needs: [card-data]
if: ${{ github.repository == 'phase-rs/phase' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/preview-server.yml
with:
fingerprint: ${{ needs.card-data.outputs.engine_fingerprint }}
commit: ${{ github.event.workflow_run.head_sha || github.sha }}
card_data_sha256: ${{ needs.card-data.outputs.card_data_sha256 }}
card_data_hash16: ${{ needs.card-data.outputs.card_data_hash16 }}
draft_pools_sha256: ${{ needs.card-data.outputs.draft_pools_sha256 }}
draft_pools_hash16: ${{ needs.card-data.outputs.draft_pools_hash16 }}
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
SERVER_ARTIFACT_MINISIGN_PRIVATE_KEY: ${{ secrets.SERVER_ARTIFACT_MINISIGN_PRIVATE_KEY }}
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 353-353: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow

(secrets-inherit)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy.yml around lines 349 - 361, Replace the broad
secrets inheritance on the preview-server job with an explicit mapping for only
CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, and
SERVER_ARTIFACT_MINISIGN_PRIVATE_KEY, sourcing each from the caller workflow’s
corresponding secrets while leaving the existing preview-server inputs
unchanged.

Source: Linters/SAST tools

Comment on lines +75 to +84
<motion.div
className="fixed inset-0 z-[80] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
role="status"
aria-live="polite"
aria-atomic="true"
aria-busy={progress.phase !== "ready" && progress.phase !== "failed"}
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not block pointer users with a passive status region.

This full-screen element intercepts pointer input, but role="status" neither moves nor traps focus; keyboard users can still operate the obscured app while pointer users are blocked for up to five seconds. Make this a non-blocking status surface (pointer-events-none) or implement it as a proper modal dialog with focus handling.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@client/src/components/chrome/NativeEngineProgressOverlay.tsx` around lines 75
- 84, Update the full-screen motion.div in NativeEngineProgressOverlay to be a
non-blocking status surface by adding pointer-events-none to its styling,
allowing pointer interaction with the underlying app while preserving the
existing role, live-region attributes, and visual overlay behavior.

Comment on lines +62 to +63
const { listen } = await import("@tauri-apps/api/event");
return listen<NativeEngineProgress>("native-engine-progress", ({ payload }) => listener(payload));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Make provisioning progress replayable. listen() only sees events after registration. If NativeEngineProgressOverlay mounts after the native side has already sent resolving, ready, or failed, that state is lost permanently. Persist/query the latest progress or subscribe before any provisioning call, and handle an event emitted during registration.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@client/src/services/nativeEngine.ts` around lines 62 - 63, Update the
native-engine progress flow around the listen call and
NativeEngineProgressOverlay so the latest resolving, ready, or failed state is
persisted or queryable and replayed when the overlay mounts. Ensure subscription
is established before provisioning begins where applicable, and handle any
progress event emitted during listener registration so no state is lost.

@matthewevans
matthewevans added this pull request to the merge queue Jul 23, 2026
@github-actions

Copy link
Copy Markdown

Parse changes introduced by this PR

✓ No card-parse changes detected.

Merged via the queue into main with commit e924a9b Jul 23, 2026
15 checks passed
@matthewevans
matthewevans deleted the ship/fix-desktop-show-native-engine-provisioning-status branch July 23, 2026 16:02
jsdevninja pushed a commit to jsdevninja/phase that referenced this pull request Jul 24, 2026
* fix(desktop): show native engine provisioning status

* fix(release): recover main bundle and clarify desktop downloads

---------

Co-authored-by: matthewevans <matthewevans@users.noreply.github.com>
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.

1 participant