From a6db9e859863e470c538f712e3968674e6af206c Mon Sep 17 00:00:00 2001 From: autonaps62 Date: Fri, 6 Feb 2026 12:51:34 +0000 Subject: [PATCH 1/2] fix: critical bug where resume() destroyed stacks instead of resuming Bug fixes: - Fix resume/1 function that was calling :destroy instead of :resume This was a critical bug causing data loss when resuming suspended stacks - Add optional chaining to axios error handler to prevent crash on network errors - Add missing VITE_APTABASE_APP_KEY type definition Code quality: - Remove duplicate alias imports in server.ex - Translate Portuguese comment to English Co-Authored-By: Claude Opus 4.5 --- frontend/src/api/axios.ts | 2 +- frontend/src/vite-env.d.ts | 1 + server/lib/ethui/stacks/server.ex | 8 +++----- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/api/axios.ts b/frontend/src/api/axios.ts index 5e32d18..f78dbda 100644 --- a/frontend/src/api/axios.ts +++ b/frontend/src/api/axios.ts @@ -29,7 +29,7 @@ api.interceptors.response.use( return response; }, (error) => { - if (error.response.status === 401) { + if (error.response?.status === 401) { useAuthStore.getState().logout(); } return Promise.reject(error); diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts index 29c29a1..50ac4e8 100644 --- a/frontend/src/vite-env.d.ts +++ b/frontend/src/vite-env.d.ts @@ -2,6 +2,7 @@ interface ImportMetaEnv { readonly VITE_API_URL: string; + readonly VITE_APTABASE_APP_KEY?: string; } interface ImportMeta { diff --git a/server/lib/ethui/stacks/server.ex b/server/lib/ethui/stacks/server.ex index 9c58e16..3ed6910 100644 --- a/server/lib/ethui/stacks/server.ex +++ b/server/lib/ethui/stacks/server.ex @@ -9,9 +9,7 @@ defmodule Ethui.Stacks.Server do alias Ethui.Services.{Anvil, Graph} alias Ethui.Stacks - alias Ethui.Stacks.MultiStackSupervisor - alias Ethui.Stacks.Stack - alias Ethui.Stacks.{Stack, MultiStackSupervisor} + alias Ethui.Stacks.{MultiStackSupervisor, Stack} # state @type t :: %{ @@ -56,10 +54,10 @@ defmodule Ethui.Stacks.Server do end def resume(%Stack{} = stack) do - GenServer.call(__MODULE__, {:destroy, stack}) + GenServer.call(__MODULE__, {:resume, stack}) end - # adicionar public api aqui, nao queromos interagir com o anvil diretamente + # Public API for stack services - avoid direct interaction with anvil def anvil_url(slug) do with [{pid, _}] <- Registry.lookup(Ethui.Stacks.Registry, {slug, :anvil}), From 08874c2c3a6edcc456a67fd63c2352a41b494fea Mon Sep 17 00:00:00 2001 From: autonaps62 Date: Fri, 6 Feb 2026 12:53:16 +0000 Subject: [PATCH 2/2] fix: add missing id to setup-beam step for PLT cache key The CI was failing with "Old PLT file" error because the setup-beam step was missing an id, causing steps.beam.outputs to be undefined and resulting in a partial cache key match that restored stale PLTs. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d44454f..4d8df60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ jobs: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 + id: beam with: elixir-version: "1.18.3" otp-version: "OTP-27"