diff --git a/docs/releases/console-3.1.12.md b/docs/releases/console-3.1.12.md new file mode 100644 index 0000000..08cbad2 --- /dev/null +++ b/docs/releases/console-3.1.12.md @@ -0,0 +1,9 @@ +# Console 3.1.12 + +Release date: 2026-10-04. + +- Place the Console Version button directly beside the Edge Console title using the shared wrapping title row. +- Keep Check versions visible in the Console header, including when the cached catalog reports the latest installed version. Continue displaying the Update action when a newer release is available. +- Refresh the Git release catalog asynchronously every 60 seconds when status is requested, instead of every 15 minutes. Preserve request coalescing, error backoff and the existing 15-minute installation catalog validity limit. + +Validation: stage-owner tests including refresh throttling; browser checks at four viewport widths for header controls and update confirmation. diff --git a/offline/stage_versions.py b/offline/stage_versions.py index fc419e1..ec556c9 100644 --- a/offline/stage_versions.py +++ b/offline/stage_versions.py @@ -34,6 +34,7 @@ STAGES = { 'stage_reverse_tunnels': ('Reverse Tunnels', ['reverse_tunnel']), } CHECK_TTL = 900 +CHECK_INTERVAL = 60 _guard = threading.Lock() _job_guard = threading.Lock() _checking = False @@ -128,7 +129,7 @@ def request_check(force=False): with _guard: cached = read_json(STATE / 'available.json') age = time.time() - cached.get('attempt_at', 0) - minimum_age = 0 if force else (30 if cached.get('error') else CHECK_TTL) + minimum_age = 0 if force else (30 if cached.get('error') else CHECK_INTERVAL) if _checking or age < minimum_age: return _checking = True diff --git a/offline/test_stage_versions.py b/offline/test_stage_versions.py index 9349756..7fbc973 100644 --- a/offline/test_stage_versions.py +++ b/offline/test_stage_versions.py @@ -232,6 +232,15 @@ class StageVersionsTest(unittest.TestCase): self.assertEqual(expected, versions.read_json(versions.STATE / 'available.json')['error']) self.assertFalse(self.snapshot()['can_install']) + def test_release_check_refreshes_after_one_minute(self): + for age, expected in [(59, False), (61, True)]: + with self.subTest(age=age), mock.patch.object(versions, '_checking', False), \ + mock.patch.object(versions, 'read_json', return_value={'attempt_at': 1000}), \ + mock.patch.object(versions.time, 'time', return_value=1000 + age), \ + mock.patch.object(versions.threading, 'Thread') as thread: + versions.request_check() + self.assertEqual(expected, thread.return_value.start.called) + def test_release_fetch_is_async_coalesced_and_pinned(self): (versions.STATE / 'available.json').unlink() started, release = threading.Event(), threading.Event() diff --git a/stage-releases.json b/stage-releases.json index e0a83e2..ca48c04 100644 --- a/stage-releases.json +++ b/stage-releases.json @@ -14,7 +14,7 @@ "version": "1.0.0" }, "stage_ui": { - "version": "3.1.11" + "version": "3.1.12" }, "stage_avahi": { "version": "1.0.0" diff --git a/stage_ui/console_core/backend/app.py b/stage_ui/console_core/backend/app.py index e48e7c1..6140499 100644 --- a/stage_ui/console_core/backend/app.py +++ b/stage_ui/console_core/backend/app.py @@ -54,7 +54,7 @@ APP_DIR = "/opt/iomatex-console" PUBLIC_DIR = os.path.join(APP_DIR, "public") PROVIDERS_DIR = os.path.join(APP_DIR, "providers.d") CONFIG_PATH = "/etc/iomatex/console.json" -UI_VERSION = "V 3.1.11" +UI_VERSION = "V 3.1.12" STORAGE_HEALTH_COMMAND = "/usr/local/sbin/iomatex-storage-health" ZONEINFO_ROOT = "/usr/share/zoneinfo" diff --git a/stage_ui/console_core/backend/test_service_diagnostics_browser.cjs b/stage_ui/console_core/backend/test_service_diagnostics_browser.cjs index 320b472..ff58871 100644 --- a/stage_ui/console_core/backend/test_service_diagnostics_browser.cjs +++ b/stage_ui/console_core/backend/test_service_diagnostics_browser.cjs @@ -23,6 +23,9 @@ const base=process.env.EDGE_CONSOLE_URL || 'http://192.168.0.109'; if(logs!==0)throw Error('Eager log fetch'); if(await page.locator('#tabContent [onclick="window.__openHelp(\'service:console\')"]').count())throw Error('Duplicate Console card'); const header=page.locator('header #consoleRelease'); + const titleRow=header.locator('.panelTitleRow'); + if(await titleRow.getByRole('button',{name:/^Version:/}).count()!==1)throw Error('Version outside title row'); + if(await header.getByRole('button',{name:'Check versions',exact:true}).count()!==1)throw Error('No header release check'); await header.getByRole('button',{name:'Update 3.1.9',exact:true}).click(); await page.locator('.platformDialog').waitFor(); await page.keyboard.press('Escape'); diff --git a/stage_ui/console_core/frontend/console.js b/stage_ui/console_core/frontend/console.js index 9fdbf26..d222cef 100644 --- a/stage_ui/console_core/frontend/console.js +++ b/stage_ui/console_core/frontend/console.js @@ -49,7 +49,7 @@ { mode: "test_by", label: "test.it-screen.by", host: "rest.test.it-screen.by" }, { mode: "custom", label: "Custom", host: "" } ]; - const UI_VERSION = "V 3.1.11"; + const UI_VERSION = "V 3.1.12"; const ITSCREEN_LOG_INITIAL_LINES = 50; const ITSCREEN_LOG_BUFFER_LIMIT = 300; const ITSCREEN_LOG_BATCH_MS = 250; @@ -823,10 +823,11 @@ return ``; } - function renderPanelTitle(title, helpId, subtitle = "") { + function renderPanelTitle(title, helpId, subtitle = "", actions = "") { return `
${esc(subtitle)}
` : ""} @@ -2421,17 +2422,19 @@ : updates.checking ? t("Checking versions...") : updates.error ? t(updates.error) : needsCheck ? t("Check available versions before installing.") : ""; + const versionButton = ``; return `