* feat(testing): add Playwright E2E infrastructure and stabilize test suite
- Add Playwright E2E configuration and ui-navigation / plugin-system tests
- Add GitHub Actions workflow for Playwright CI tests
- Add test helpers and fixtures (e2e-mock-plugin)
- fix(testing): resolve UnverifiedPluginBatchDialog UI blocking issue in E2E tests
- fix(testing): limit Playwright to 2 workers locally to avoid Next.js/Prisma exhaustion
- fix(api): replace deprecated processAuthCodeResponse with authorizationCodeGrant
- test(ui): add data-testid to PanelToggleArrows and AppShell
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix(ci): restrict GITHUB_TOKEN permissions to read contents
* docs(e2e): document Playwright infrastructure and mock plugin lifecycle
* fix(e2e): explicitly load .env in teardown and fix dev command pathing
* fix(ci): resolve playwright environment setup and database initialization
Changes:
- Patch: Added pnpm run setup step to .github/workflows/playwright.yml to generate .env in CI
- Patch: Added explicit loadEnv() helper to ests/global.setup.ts and ests/global.teardown.ts to ensure database credentials are fresh
- Patch: Hardened scripts/safe-db-push.mjs to detect missing DATABASE_URL and explicitly prompt for pnpm run setup rather than assuming production
- Patch: Updated scripts/dev.mjs to execute pnpm exec next dev instead of raw
ext dev to resolve pathing issues
- Patch: Bumped version in package.json to 2.14.4
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit includes the work done by the Flash subagent to add comprehensive TSDoc comments to src/components/panels, src/core/state, and src/core/plugins, improving IDE intellisense and codebase maintainability.
Adds an opt-in agent integration surface that lets a trusted external
tool (running as the same logged-in user) drive the running WWV browser
session — fly the globe, toggle layers, focus entities — by POSTing
JSON actions to the server, which fans them out over SSE to every
connected browser tab belonging to that user.
The motivating use case is an MCP server (a Model Context Protocol
adapter): an LLM agent calls a tool like `globe_fly_to({lat, lon})`,
the MCP server posts to `/api/agent/publish`, the browser subscriber
re-emits the action onto the existing client-side `dataBus`, and the
React + Cesium app handles it the same way it would handle any UI
button click. Read-only camera / engine queries already work via the
existing REST surface — this PR adds the missing write path.
What's added:
- `src/lib/agent/bus.ts` — process-local AgentBus singleton, scoped
per user. Subscriptions live in a `Map<userId, Map<connId, sub>>`
so user A's publish never reaches user B's stream, even though
both run on the same Node process.
- `src/app/api/agent/stream/route.ts` — SSE channel. Auth-gated. Sends
initial `:connected` + `retry:3000` directives and a `:hb` heartbeat
every 25s so intermediary proxies (Caddy, Nginx, CDNs) don't tear
down a "stalled" connection.
- `src/app/api/agent/publish/route.ts` — POST endpoint. Accepts JSON
AgentAction shapes (`fly_to`, `face_towards`, `layer_toggle`,
`highlight_layer`, `select_entity`, `ping`), broadcasts only to the
publishing user's bus bucket. Returns `{delivered, subscribers}` so
the caller knows how many tabs received the command.
- `src/components/layout/AgentBusSubscriber.tsx` — browser EventSource
client. Re-emits received actions onto `dataBus` (`cameraGoTo`,
`cameraFaceTowards`, `layerToggled`, `entitySelected`) — every plugin
is already listening on those channels, so no plugin changes needed.
- `AppShell.tsx` — mounts `AgentBusSubscriber` next to the existing
`DataBusSubscriber`. Two lines.
- `src/app/api/build/route.ts` — `/api/build` returns build id +
timestamp + public flag state. Pairs with a one-line console.log
the subscriber prints on mount so a stale-bundle / config-mismatch
is visible at a glance instead of looking like a feature regression.
Default off via `NEXT_PUBLIC_WWV_AGENT_BUS_ENABLED=true`. An unintended
deployment doesn't open a remote-control channel for users who didn't
opt in.
What's changed in the Dockerfile:
- Adds ARG declarations for the new vars (`NEXT_PUBLIC_WWV_AGENT_BUS_ENABLED`,
`NEXT_PUBLIC_WWV_BUILD_ID`, `NEXT_PUBLIC_WWV_BUILD_AT`).
- Stamps the build with millisecond-precision id + ISO timestamp
(`/app/.build-id`, `/app/.build-at`); both copied into the runner
stage for `/api/build` to read.
- Writes `/app/.env.production.local` from declared ARGs *before*
`next build` runs. Docker doesn't reliably promote ARGs into the
Node child-process environment for the build command, so
`process.env.NEXT_PUBLIC_*` references that previously inlined
through Webpack's DefinePlugin sometimes fell back to runtime
polyfill access (`tV.env.NEXT_PUBLIC_X`) that resolves to `undefined`
in the browser. Writing the env file is the documented Next.js path
and behaves the same on every host.
Default-off, no schema changes, no plugin changes, fully backwards-compatible
on operators who don't opt in.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(ui): add centralized theme tokens and light mode switcher
- Refactor: Moved hardcoded colors, borders, typography, and glass effects into centralized src/styles/theme-tokens.css (Patch)
- Feat: Implemented a robust Light/Dark mode switcher via Zustand and localStorage, persisting via data-theme attribute (Minor)
- Refactor: Updated globals.css and component-specific stylesheets to use centralized variables instead of hardcoded values (Patch)
* fix(feedback): use correct production webhook URL and add error toast on fetch failure
* feat(ui): major UI overhaul and video interactions
feat(ui): redesign WorldWideView user interface
feat(video): add zooming and panning to video window
fix(ui): resolve UI component contrast issues
fix(globe): correct Cesium globe layout shrinking issue
fix(interaction): restore globe interaction UI and time selection dropdown
Wait for injectHostGlobals to complete before initializing MarketplaceSync. This fixes the 'React is not defined / __WWV_HOST__ is undefined' error when mounting the AppShell.
Dynamically import cesium and resium in hostGlobals to prevent server-side webpack from incorrectly bundling binary assets into the SSR template strings, which caused 'Octal escape sequences are not allowed in template strings'.
Most state DOTs (NCDOT, WSDOT, GDOT, fallback HLS-failure paths from
Caltrans/511NY) serve traffic cameras as JPEG snapshots that update
server-side every 5–30 seconds rather than as continuous video streams.
The current `<img src={resolvedUrl}>` in `CameraStream.tsx` renders the
URL once and the browser caches the result — so the camera "loads" then
freezes on the first frame, which reads as broken even when the source
is fine.
Add a cache-busted refresh tick that increments every 10s while the
stream is playing and an image source is active. Skipped for HLS, iframe,
and known video platforms (they manage their own playback). Interval is
cleared when the stream stops, so no leaks on tab switch / pop-out.
The bumped query param is namespaced (`_t=`) and appended with the
correct separator depending on whether the source URL already has query
params (NCDOT's `?filename=...` pattern in particular).
Co-authored-by: Sapphire <sapphire@tiktokcoach>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: Silvertakana <[email protected]>
* feat(cloud): implement Postgres DB adapter, fix static build crashes, and containerize NextAuth/Stripe integrations
* test(marketplace): fix mocks and assertions for multi-tenant Postgres architecture
* feat: rsa jwt license key verification and state integration
* feat: add internal workspace validation route for Edge Functions
* refactor: clean up hub routes and finalize db proxy/adapter for multi-tenant cloud deploy
* feat(cloud): finalize multi-tenant Prisma extensions and workspace routing
* fix(db): correct Prisma 7 better-sqlite3 adapter initialization [Patch]
- update better-sqlite3 adapter instantiation to use configuration object ({ url }) required by Prisma 7 instead of raw Database instance [Patch]
- fix PrismaClientConstructorValidationError by generating client with adapter support [Patch]
* fix(auth): support dynamic origins for local proxies and multi-tenant subdomains [Patch]
- prioritize forwarded headers and request host over hardcoded envOrigin in getRequestOrigin to support subdomain routing [Patch]
- allow ALLOWED_DEV_ORIGIN in marketplace install redirect checks to fix local network development login flows [Patch]
* fix(marketplace): enable dynamic CORS reflection for marketplace API [Patch]
- remove explicit origin array, replacing with origin header reflection to allow marketplace hosted on any domain or local IP [Patch]
- remove global wildcard CORS headers from next.config.ts to harden security against broader app injection [Patch]
* feat(db): create initial postgresql migration
* refactor(db): update remaining files for postgresql
* feat(db): unify database adapter to PostgreSQL-only [Minor]
- replace SQLite adapter with PostgreSQL PrismaPg [Minor]
- remove better-sqlite3 dependencies [Patch]
- finalize docs and implementation plan [Patch]
* fix: resolve prisma client generation and script execution issues with tsx and type module
* feat(db): port tenant isolation logic to new PostgreSQL adapter
* docs: add rule for transparent and narrated agent actions
* BREAKING CHANGE(core): migrate to PostgreSQL and add auto-migration pipeline [Major]
- unified database adapter to exclusively use PostgreSQL [Major]
- implement auto-migration pipeline to pipe legacy SQLite data to Postgres [Major]
- add sqlite to runner stage to support extraction pipeline [Patch]
* feat(core): migrate to Prisma 7 and unify PostgreSQL architecture [Minor]
- removed legacy Prisma SQLite driver and all Better-Sqlite dependencies [Minor]
- updated schema to utilize purely postgresql providers [Patch]
- modified migration scripts to seamlessly convert local sqlite DBs to PostgreSQL containers using keinos/sqlite3 [Minor]
- updated deployment scripts, Coolify pipelines, and Nginx proxy support [Patch]
- injected Prisma Client Extensions for multi-tenant Row Level Security isolation [Minor]
- stabilized PrismaClient initialization utilizing the official adapter-pg runtime pattern [Patch]
- bumped version to 2.1.0
* fix(core): resolve TypeScript compilation errors for CI [Patch]
- fixed NextResponse.json() 3-arg calls to use 2-arg ResponseInit form [Patch]
- replaced invalid 'developer' TrustTier with 'unverified' in parseWwvManifest and load-unpacked route [Patch]
- removed non-existent pluginManager.hotReload() call in DevModeSubscriber, replaced with disable/reload cycle [Patch]
- updated Stripe API version from '2024-04-10' to '2026-04-22.dahlia' to match installed SDK [Patch]
- excluded local-scripts/ from tsconfig to prevent debug scripts from breaking CI [Patch]
* fix(ci): resolve pnpm version conflict in GitHub Actions [Patch]
- removed explicit version: 9 from pnpm/action-setup@v4 — v4 auto-reads packageManager from package.json [Patch]
- updated build job DATABASE_URL from SQLite to PostgreSQL format [Patch]
* fix(docker): add explicit Prisma generator output path for Docker builds [Patch]
- Prisma 7 changed default output location, causing COPY --from=builder to fail
- added output = '../src/generated/prisma' to generator block for consistency
* fix(prisma): update client import path and resolve CI type errors [Patch]
- updated PrismaClient import in db.ts to point to custom generated output path
- resolved implicit 'any' error in marketplace check-updates route
- verified clean local build with tsc --noEmit
* chore(deps): sync Prisma versions to 7.6.0 [Patch]
When a local data engine is detected at localhost:5001, the frontend
fetches its /manifest to discover available seeders. Plugins with
local seeders route to the local engine; plugins without fall back
to the cloud engine at wss://dataengine.worldwideview.dev/stream.
This enables core contributors to develop with the public engine
while proprietary data sources continue working via the cloud.
Resolve engine URL per-plugin via resolveEngineUrl() before
subscribing. Remove eager wsClient.connect() — connections
are now lazy on first subscription.
- add npx prisma generate to CI action before type checks [Patch]
- fix missing globSync import in workspace type tests [Patch]
- fix GlobeView undefined indexing for entity rendering [Patch]
- fix OSMSearchPlugin zoom property to flyToBaseDistance [Patch]
- allow getSidebarComponent to accept an optional plugin prop [Patch]
- map categories for embassies and spaceports [Patch]
Co-authored-by: Antigravity AI <[email protected]>
* feat(core): conditionally load Google 3D Tiles via custom API key [Minor]
- change default baseLayerId to bing-aerial [Patch]
- useViewerInit skips Google 3D layer unless key present [Minor]
- add reload prompt to ApiKeysTab on Google Maps key save [Patch]
* fix(map): implement persistent user layer intent and ui fallback highlighting
---------
Co-authored-by: Antigravity AI <[email protected]>