Skip to content

Fix: Tray window rebuild - #62

Merged
MathCunha16 merged 1 commit into
mainfrom
fix/tray-window-rebuild
Sep 6, 2026
Merged

MathCunha16 merged 1 commit into
mainfrom
fix/tray-window-rebuild

Conversation

@MathCunha16

@MathCunha16 MathCunha16 commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes the macOS/Windows/Linux release build failure introduced by the tray grace-period feature: recreate_splash_window was rebuilding the splash window by calling WebviewWindowBuilder methods one by one (.title(), .decorations(), .transparent(), etc.), duplicating what tauri.conf.json already declares. .transparent() requires Tauri's unstable cargo feature, which wasn't enabled - two earlier attempts to fix this by adding a transparent feature (which doesn't exist) and then unstable both worked around the symptom instead of the actual issue.

The real fix removes the manual attribute duplication entirely: both main and splash are now rebuilt via WebviewWindowBuilder::from_config(), reading their definitions straight from tauri.conf.json - the same construction path Tauri itself uses at boot. This needs no extra cargo feature, and keeps tauri.conf.json as the single source of truth for window attributes instead of a second copy living in Rust code that can drift out of sync.

Related issue

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor or maintenance
  • Documentation
  • Other (describe below)

How was this tested?

  • Ran npm run tauri build locally and confirmed it compiles without any tauri cargo feature changes (back to the original ["tray-icon", "image-png"]).
  • Sent the app to the tray, waited past the grace period, reopened from the tray, and confirmed both the splash and main windows rebuild with the same appearance (size, transparency, decorations, always-on-top) as a normal cold boot.
  • Confirmed reopening within the grace period still works via the existing fast path (window just unhidden, no rebuild).

Checklist

  • I have read CONTRIBUTING.md.
  • The change is focused and does not include unrelated refactors.
  • I added or updated documentation when needed.
  • I added or updated tests when the behavior requires it.
  • I ran the relevant existing checks locally.
  • I did not include secrets, credentials, personal data, or generated build artifacts.
  • I understand the code I am submitting and reviewed all AI-assisted output, if any.
  • I disclosed significant AI assistance that affected the design or implementation, if applicable.

Screenshots or recordings

Add screenshots or recordings for visual changes. Remove sensitive information before posting.

Summary by CodeRabbit

  • Novidades

    • A reabertura do aplicativo agora recria as janelas conforme as configurações definidas, incluindo as janelas inicial e principal.
  • Atualizações

    • A versão do aplicativo foi atualizada para v0.2.0-beta.
    • O suporte visual de transparência foi ajustado, mantendo os recursos de ícone na bandeja e imagens PNG.

@MathCunha16 MathCunha16 self-assigned this Sep 6, 2026
@MathCunha16 MathCunha16 added the Desktop Desktop feature or modification label Sep 6, 2026
@MathCunha16
MathCunha16 merged commit accb784 into main Sep 6, 2026
1 of 2 checks passed
@MathCunha16
MathCunha16 deleted the fix/tray-window-rebuild branch September 6, 2026 13:11
@coderabbitai

coderabbitai Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Essentials

Run ID: c26abff3-e22b-48a7-8253-2234d4239595

📥 Commits

Reviewing files that changed from the base of the PR and between 2aa024a and 0f5524a.

📒 Files selected for processing (5)
  • backend/internal/domain/model/version.go
  • frontend/package.json
  • frontend/src-tauri/Cargo.toml
  • frontend/src-tauri/src/tray.rs
  • frontend/src-tauri/tauri.conf.json

📝 Walkthrough

Walkthrough

A versão do projeto foi atualizada para 0.2.0-beta. O tray agora recria as janelas splash e main usando as configurações declaradas em tauri.conf.json.

Changes

Versão e reconstrução de janelas

Layer / File(s) Summary
Alinhamento de versões
backend/internal/domain/model/version.go, frontend/package.json, frontend/src-tauri/Cargo.toml, frontend/src-tauri/tauri.conf.json
As versões do backend, frontend, pacote Tauri e configuração da aplicação foram atualizadas para 0.2.0-beta.
Reconstrução baseada na configuração
frontend/src-tauri/Cargo.toml, frontend/src-tauri/src/tray.rs
A função rebuild_from_config recria as janelas a partir de tauri.conf.json. A reabertura recria splash e main, e o recurso transparent foi removido da dependência tauri.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.97.1)

Clippy execution timed out


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

Desktop Desktop feature or modification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant