Skip to content

Fix: prod webview connection - #21

Merged
MathCunha16 merged 2 commits into
mainfrom
patch/fix-prod-webview-connection
Jul 25, 2026
Merged

Fix: prod webview connection#21
MathCunha16 merged 2 commits into
mainfrom
patch/fix-prod-webview-connection

Conversation

@MathCunha16

@MathCunha16 MathCunha16 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

This pull request introduces improvements to the release workflow and enhances how the frontend determines the API base URL, making the configuration more robust and environment-aware. It also updates the application version and ensures consistency in how the API base URL is used across the codebase.

Frontend enhancements:

  • Added a new getApiBaseUrl function in frontend/src/api/client.ts to determine the API base URL based on environment variables or the current window location, with a fallback to localhost. Updated apiClient and its request interceptor to use this function, ensuring consistent and dynamic API endpoint resolution.
  • Updated frontend/src/features/releases/api/releasesApi.ts to use getApiBaseUrl instead of directly accessing environment variables, ensuring all API calls use the same logic for determining the base URL. [1] [2]

Release workflow improvements:

  • Modified .github/workflows/release.yml to use glob patterns (**/*.deb, etc.) for asset uploads, allowing files in nested directories under release-assets to be included in releases.

Version update:

  • Updated the application version from 0.1.0-alpha to 0.1.1-alpha in backend/src/main/resources/application.yaml.

Summary by CodeRabbit

  • Novidades

    • O aplicativo agora identifica automaticamente o endereço da API com base no ambiente em que está sendo executado.
    • Downloads e instalações de versões utilizam o mesmo endereço de API detectado dinamicamente.
  • Correções

    • Artefatos de lançamento armazenados em subdiretórios passam a ser incluídos corretamente nas publicações.
    • Versão atualizada para 0.1.1-alpha.

@MathCunha16 MathCunha16 self-assigned this Jul 25, 2026
@MathCunha16 MathCunha16 added Frontend Frontend feature or modification Desktop Desktop feature or modification labels Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 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: Pro

Run ID: 3b4e60b0-1a7c-44f2-8820-6082ea64d7ad

📥 Commits

Reviewing files that changed from the base of the PR and between 0ffee8a and 1c5d76a.

📒 Files selected for processing (4)
  • .github/workflows/release.yml
  • backend/src/main/resources/application.yaml
  • frontend/src/api/client.ts
  • frontend/src/features/releases/api/releasesApi.ts

📝 Walkthrough

Walkthrough

O PR atualiza a resolução dinâmica da URL da API no frontend, ajusta o endpoint de instalação de releases, amplia a busca de artefatos publicados para subdiretórios e altera a versão do backend para 0.1.1-alpha.

Changes

Resolução da URL da API

Layer / File(s) Summary
Resolução dinâmica e integração da URL da API
frontend/src/api/client.ts, frontend/src/features/releases/api/releasesApi.ts
getApiBaseUrl() prioriza VITE_API_BASE_URL, usa window.location.origin como fallback e recalcula a URL a cada requisição; streamDownloadAndInstall passa a reutilizar essa função.

Publicação de releases

Layer / File(s) Summary
Artefatos e versão da publicação
.github/workflows/release.yml, backend/src/main/resources/application.yaml
O workflow busca arquivos .deb, .rpm, .msi e .dmg recursivamente em release-assets; a versão do backend muda para 0.1.1-alpha.

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

Possibly related PRs

Suggested labels: Devops

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

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

@MathCunha16
MathCunha16 merged commit 5293539 into main Jul 25, 2026
0 of 2 checks passed
@MathCunha16
MathCunha16 deleted the patch/fix-prod-webview-connection branch July 25, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Desktop Desktop feature or modification Frontend Frontend feature or modification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant