Skip to content

Z3R4H: Windows offline launcher, wrapper scaffold, geo services, UI rebrand & prompt stack#7

Merged
RadDad87 merged 1 commit into
mainfrom
codex/propose-plan-for-windows-launcher-implementation-9ldchg
Apr 18, 2026
Merged

Z3R4H: Windows offline launcher, wrapper scaffold, geo services, UI rebrand & prompt stack#7
RadDad87 merged 1 commit into
mainfrom
codex/propose-plan-for-windows-launcher-implementation-9ldchg

Conversation

@RadDad87

Copy link
Copy Markdown
Owner

Motivation

  • Provide a Windows-first, fully offline local product path (Z3R4H) that launches Open WebUI against local llama.cpp/Valhalla runtimes and emphasizes offline survival usage.
  • Harden startup on clean Windows machines with a portable BAT launcher and a planned .exe-first wrapper to improve operator UX and failover to the BAT fallback.
  • Add local terrain/routing/geospatial tooling (Valhalla client, DEM sampling, terrain analysis, suitability scoring) and a geo advisor UI to support Navigation & Terrain mode.
  • Introduce Z3R4H branding, mode-driven prompt stack, and deterministic mode→model routing for offline mode-specific behavior.

Description

  • Added documentation and planning artifacts including PROJECT_BRIEF.md, TASKS.md, Z3R4H_CLEAN_ENV_CHECKLIST.md, and Z3R4H_PROGRESS_SUMMARY.md for scope, tasks and RC validation workflows.
  • Implemented a portable Windows launcher launch_z3r4h.bat and runtime config runtime/runtime_config.env plus helper scripts under runtime/ to start bundled or fallback runtimes (start_backend.bat, start_valhalla.bat, build_backend_exe.bat).
  • Added a native C#/.NET wrapper scaffold under wrapper/ (Program.cs, ConfigResolver, RuntimeOrchestrator, ReadinessProbe, BatFallback, StartupScreen, logging and config types) implementing package-root resolution, dual-service orchestration, readiness probing, structured exit codes and BAT fallback hooks (Task 19–25 milestones).
  • Backend: added a geo router and services under backend/open_webui/services/geo/ including valhalla_client.py, dem_loader.py, terrain_service.py, suitability_service.py, ai_geo_orchestrator.py, and pydantic schemas.py, plus config.py feature flags and health checks; wired routers/geo.py into main.py at /api/geo.
  • Frontend/UI: rebranded app strings and manifests to Z3R4H in src/lib/constants.ts, app.html, site manifests and search descriptors; added mode selector UI (Z3R4HModeSelector.svelte), mode-aware prompt stack and model routing utilities (z3r4hPromptStack.ts, z3r4hModeRouting.ts), and integrated mode storage and prompt composition into chat flows (Chat.svelte, Navbar.svelte, Channel.svelte).
  • Geo UI: implemented a maps page and components GeoAdvisor.svelte, RouteResultCard.svelte, SiteResultCard.svelte and wiring at src/routes/(app)/maps/+page.svelte plus Svelte store src/lib/stores/geo.ts and client-side integration for /api/geo endpoints.
  • Prompts and modes: added core system prompt and mode-specific prompts under src/lib/prompts/z3r4h/ including core_system.txt, failure_behavior.txt and per-mode prompts for the Z3R4H modes.
  • Tests and contracts: added backend pytest tests backend/open_webui/test/geo/test_geo_endpoints_and_services.py, frontend unit/contract tests src/lib/components/map/__tests__/maps_flow.spec.ts, and wrapper contract tests wrapper/tests/test_wrapper_startup_contract.py to codify expected behaviors and interfaces.

Testing

  • No automated test execution was performed as part of this change; the patch adds automated tests prepared for CI but did not run them here.
  • Added backend tests: backend/open_webui/test/geo/test_geo_endpoints_and_services.py which exercises geo endpoints, DEM fallback behavior, suitability scoring, and intent classification.
  • Added frontend tests: src/lib/components/map/__tests__/maps_flow.spec.ts (Vitest) to assert UI contract hooks for the geo components, and wrapper tests: wrapper/tests/test_wrapper_startup_contract.py to assert startup orchestration text/paths for the wrapper scaffold.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3456d8fde

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +34 to +35
if ((int)res.StatusCode >= 200 && (int)res.StatusCode < 500)
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require 2xx responses before declaring readiness

WaitForEndpointReadyAsync currently marks any HTTP status in the 200–499 range as healthy, so a 404/401 from a wrong or missing health route is treated as readiness and startup continues. In this wrapper flow, that can falsely report backend/geo/routing as ready and open the browser even though required endpoints are unavailable; readiness checks should only succeed on explicit success statuses (typically 2xx) and keep polling otherwise.

Useful? React with 👍 / 👎.

Comment thread launch_z3r4h.bat
Comment on lines +179 to +180
where curl.exe >nul 2>&1
if errorlevel 1 exit /b 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid hard-failing probes when curl.exe is absent

In :probe_url, a not-yet-ready PowerShell probe falls through to a curl check, and missing curl.exe returns errorlevel 2; :wait_url treats that as a fatal "probe unavailable/blocked" state and exits immediately. On Windows environments without curl, startup fails on the first polling attempt even though PowerShell probing is available and the service may just need more time to become ready.

Useful? React with 👍 / 👎.

@RadDad87
RadDad87 merged commit f97cabc into main Apr 18, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant