Skip to content

docs(apps-dataapi): re-verify on the Docker demo stack - #22

Merged
viethqb merged 1 commit into
mainfrom
docs/demo-apps-dataapi
Oct 20, 2026
Merged

viethqb merged 1 commit into
mainfrom
docs/demo-apps-dataapi

Conversation

@viethqb

@viethqb viethqb commented Oct 20, 2026

Copy link
Copy Markdown
Member

Summary

Re-verified the Apps (platform/explore/apps/*) and Data API (platform/data-api/**) pages against the running Docker demo stack.

  • Re-shot: 36 screenshots. 11 Apps (10 under apps/ + explore-apps), of which 5 are new: editor, viewer, viewer-trends, restore-dialog, not-published. 25 Data API (20 under data-api/ + 5 data-api-*). The stale apps/edit-unavailable.png and apps/view-unavailable.png are removed; nothing references them any more.
  • Pages rewritten: 18. The four Apps pages are now written from what the product really does: editor header, edit sessions, stale cells, refused marimo endpoints (no autocomplete), what egret_marimo and the gateway answered (run from an app), Altair vs plotly.express, publishing and the 409 race, the stale Versions dialog, restore, sharing with Blocked and expiry, run-as-connection-user on trino-demo, and the viewer. The 14 Data API pages get updated counts, menus, alt text, re-measured rate limits (per client), expired clients, demo-stack URLs, the OpenAPI paths, and a correction on the Access tab's "Revoking will not remove access" note.
  • New idempotent seeds: scripts/seed-apps.mjs (4 apps, 4 versions with restores, 3 shares, a folder, a bookmark) and scripts/seed-data-api.mjs (3 service accounts, 6 clients including a revoked and an expired one, 8 endpoints covering live, draft and disabled, a transform, a script statement, a breaking v2 and a breaking unpublished draft). TRAFFIC=1 makes about 140 real calls (cache hits, 400/401/403/404/409 and a 429 burst), so Activity has data. Apps shots move to scripts/shots/apps.mjs, and each shot resets the viewport (screenshots.mjs reuses one page).
  • Defects found: 13 new rows (backlog below), including one S1: the demo Data Apps viewer deadlocks a few minutes after the first view. Rows to close or update: KI-040 (close), KI-027 (narrow to Apps). KI-023/024/025/026/030/031/041 were re-checked and are still true.

Still not verifiable, and why

  • Governed-connection refusals and data_access_denied (KI-030). They need a governed or per-user connection. The default workspace is shared by every area, so I did not add or change a connection.
  • Different rows per viewer in an app. trino-demo runs every query as egret (SELECT current_user from an app answered egret), so all viewers see the same rows. The page says so.
  • Viewer screenshots depend on KI-NEW-1. They were taken right after a coordinator restart of egret. After about 5 minutes the viewer hangs again until the next restart.

Build: npm run build passes. The shared webpack cache picked up another worktree's files, so I built with DOCUSAURUS_NO_PERSISTENT_CACHE=1.

Backlog (apps-dataapi)

New rows

ID Area Type Sev Description
KI-NEW-1 Apps Bug S1 On the Docker demo stack (subprocess launcher), published apps stop opening a few minutes after the first viewer opened one. Every later Open stays on Starting the app… until Egret is restarted. Cause: the egret image has no kill binary (/bin/kill and /usr/bin/kill are both missing), so SubprocessPodLauncher::kill_group (crates/egret-apps/src/subprocess_pod.rs) cannot signal the process group. When the idle reaper calls stop_run, it then waits forever on child.wait() while it holds the running_run mutex, and every ensure_run blocks behind that lock. Edit pods use a separate lock and keep working. Steps: open any published app as a viewer. More than 5 minutes later, open another app, for example Customer lookup. POST …/ticket returns 200, but GET http://apps.localtest.me:18080/r/<key>/ never answers (aborted after 90 s and 180 s), and no new /var/lib/egret-apps/<key>/ directory is created. The run processes from the first open (egret_marimo.launcher --internal run, pids 80/96 after the 12:40 restart) are still alive at 12:50, and the log has no "stopped an idle app run pod". The hang was seen twice, before and after a coordinator restart of egret. Fix: install procps (or use nix::sys::signal::killpg), and do not hold the mutex across kill_group (the guard of if let Some(mut r) = self.running_run.lock().await.remove(&key) lives through the block). Edit pods (stop_edit, idle 30 min) almost certainly have the same problem.
KI-NEW-2 Apps Bug S3 The Versions dialog is stale after a publish: it still shows Nothing has been published yet. (or the old list) until the page is reloaded. usePublishApp (frontend/src/api/apps.ts:119) invalidates the app and the list but not getAppsVersionsQueryKey, while useRestoreVersion does. Steps: create app → Versions (empty) → Ctrl+S, wait, Publish draft rev 2 → toast Published version 1 → Versions still says Nothing has been published yet. → reload → v1.
KI-NEW-3 Apps UX S2 Publish draft rev N pressed right after Ctrl+S answers 409 {"error":"the draft changed since it was read","current_revision":2} with the toast The draft changed while you were publishing…, because the header re-reads the draft revision only every 5 s (useApp(..., {refetchMs})). The author did nothing wrong and has to wait and press again. Steps: new app → add cell 1 + 1 → Ctrl+S → press Publish draft rev 1 within about 0.3 s → 409. About 7 s later the button reads Publish draft rev 2 and publishing works.
KI-NEW-4 Apps Gap S2 The marimo editor has no autocomplete or hover help: the apps proxy refuses /api/lsp/health (403), so the console shows "Language server initialization failed". It also refuses /api/packages/sandbox, /api/datasources/discover and /api/usage (403), so marimo's package and data-source panels do not work and every editor load logs 5 or 6 console errors. This is by design for the LSP (demo guide), but nothing in the editor tells the author. Steps: open any app's editor and watch the network log.
KI-NEW-5 Apps Gap S3 The Data Apps image ships plotly (7.1.0) and altair but not numpy or pandas. So import plotly.express fails (Plotly Express requires numpy to be installed), and anything that calls .to_pandas() fails too. Only Altair (mo.ui.altair_chart) and plotly.graph_objects with lists work. Steps: docker exec egret-demo-egret-1 python3 -c "import plotly.express"; apps-image/constraints.txt has no numpy.
KI-NEW-6 Security Gap S2 Over plain http the session cookie is egret_session (host-only on egret.localtest.me) with no __Host- prefix. Author code served from the sibling apps.localtest.me can set Domain=localtest.me cookies that the browser then sends to Egret (cookie tossing / session fixation). Demo-only in practice (production is https), but the demo stack is what new users run. Steps: the cookie names in a signed-in storage state are egret_session, egret_csrf; the demo guide "Safety" section.
KI-NEW-7 Data API Bug S2 Access tab: Revoking will not remove access (This account also reaches invoke through the workspace, so revoking here removes the grant but not the access) is shown on every granted service account, including ones with no workspace role. For them it is false. Steps: Orders by status → Access: finance-dashboard and orders-reporting-bot both carry the note. Revoke finance-dashboard (DELETE …/grants/{sa}) → its next call answers 403 not_granted, and /orders/by-status disappears from its OpenAPI paths. The inherited-access check seems to read the account's own OpenAPI document, which lists the endpoint because of the grant.
KI-NEW-8 Apps Gap S3 A user shared into an app (share Viewer on the app) who is not a member of the workspace can get a run ticket (POST …/ticket 200) and GET …/apps/{id} 200, but GET /api/ws/{ws}/apps answers 403. They have no list or workspace switcher entry to find the app from, so it can only be opened by direct URL. Steps: share Revenue explorer with member-sso@egret.local (not a member of default) → as member-sso: list 403, detail 200, ticket run 200, ticket edit 403.
KI-NEW-9 Apps Consistency S3 The Apps list's row menu buttons are all named Actions; the Data API lists name them per row (Actions for Top customers). Screen-reader users cannot tell the rows apart. Steps: /explore/default/apps, accessible names of the ⋯ buttons.
KI-NEW-10 Data API Consistency S3 New service account puts Create service account under the page description on the left; New endpoint and New client put their create button at the top right. Steps: /explore/default/data-api/clients/new vs /endpoints/new (screenshots data-api/service-account-new, data-api/endpoint-new).
KI-NEW-11 Apps UX S3 The Apps Versions dialog says restored from an earlier version without naming it, although the API returns restored_from. Opening a draft-only app shows the raw server detail in lower case under the title (the app has no published version to run; publish it first). Steps: Revenue explorer → Versions (v3, v4); open Shipping modes by URL.
KI-NEW-12 Auth UX S2 An SSO user lands on No workspaces yet after the first sign-in and can do nothing until a workspace admin adds them. Egret only knows the user after that first sign-in, so the admin cannot add them beforehand. The demo guide documents this. Not re-observed by this area: member-sso@egret.local had already been added to data-science-lab by another area and landed in its SQL Lab. Seen first-hand by the demo-stack guide author.
KI-NEW-13 Reports Gap S3 CSV (and text) reports work on charts only. A dashboard report must be PDF or PNG, enforced by the schedule_report_format_matches_target CHECK (migration 0112; crates/egret-automation/src/runner.rs build_chart_report). The report editor should say so before save. From the demo guide and source; the UI was not exercised by this area (Alerts & reports belong to another area).

Rows to update or close

  • KI-040 (Apps, Env, S1): close. On the Docker demo stack the editor, run, publish, viewer, versions and sharing all work (screenshots apps/editor, apps/viewer, apps/viewer-trends, apps/versions-dialog). The only remaining blocker is the viewer hang, KI-NEW-1.
  • KI-027: narrow to Apps. Data API Versions → Who now shows admin@egret.local (screenshot data-api/endpoint-versions). The Apps Versions dialog still shows by 8a66d837.
  • KI-023: still true. Re-checked: a live endpoint at zz/probe-a with its draft path changed to zz/probe-b answers 404 not_found on the old path and 200 with meta.version 1 on the new one, before any publish (the probe endpoint was deleted afterwards).
  • KI-024, KI-025, KI-026, KI-031, KI-041: still true (screenshots data-api/endpoint-versions, data-api/clients-list expires 9 months ago, data-api/endpoint-params, apps/create-dialog; the Query tab still opens with Database and parameters collapsed).
  • KI-030: still true. No governed connection was added on the shared workspace.
  • KI-146: still true per the demo guide (egret init prints the admin password). Not re-observed: the restarted container's log has no init output.
  • "Not verified" paragraph: remove "Data Apps editor and viewer". Both were exercised.

Page text now stale outside this area

  • platform/known-issues.md "Not verified" paragraph lists the Data Apps editor and viewer.
  • The demo-stack guide in the egret repo (docs/en/guides/demo-stack.md) gives load times of 7.4 s (first editor load) and 4.8 s (first view). Measured here: first editor load 15 to 18 s, first view 20 to 60 s, and a cold first view once over 70 s. It does not mention KI-NEW-1, nor that plotly.express is unusable.
  • platform/workspace-settings/databases: the Apps and Data API pages rely on the Per-user delegation and Run queries as the logged-in user switch names. Please keep them in sync if that page renames them.

🤖 Generated with Claude Code

Data Apps now run on the demo stack, so the Apps pages describe the real
editor, viewer, publishing, versions and sharing instead of the "apps
origin not configured" state. Data API pages are re-shot against seeded
endpoints, clients and traffic, with re-measured rate-limit and expiry
behaviour.

- add idempotent seeds: scripts/seed-apps.mjs, scripts/seed-data-api.mjs
  (TRAFFIC=1 fills Activity)
- move Apps shots to scripts/shots/apps.mjs; reset the viewport per shot
- replace edit-unavailable/view-unavailable with editor, viewer,
  viewer-trends, restore-dialog and not-published screenshots

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@viethqb
viethqb force-pushed the docs/demo-apps-dataapi branch from ab3ec71 to 3c44f6a Compare October 20, 2026 15:07
@viethqb
viethqb merged commit 8122651 into main Oct 20, 2026
@viethqb
viethqb deleted the docs/demo-apps-dataapi branch October 20, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant