Skip to content

feat(app): detect UI modules by entrypoint shape + deferred label (T-10.13) - #181

Merged
Mkohler4 merged 1 commit into
mainfrom
codex/t-10-13-ui-module-detection
Jun 16, 2026
Merged

feat(app): detect UI modules by entrypoint shape + deferred label (T-10.13)#181
Mkohler4 merged 1 commit into
mainfrom
codex/t-10-13-ui-module-detection

Conversation

@Mkohler4

@Mkohler4 Mkohler4 commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

Finishes the deferred slice of T-10.13 — detect + label UI modules as not-runnable-here this phase (the in-browser launch stays out until a later phase).

  • Detection now keys on entrypoint shape, not just declared deps. RunnabilityClassifier flags a .uiModule when a safe entrypoint ends in .jsx/.tsx/.vue/.svelte/.astro/.html/.htm, in addition to the pre-existing requirements: UI-framework list. This catches hand-extracted UI bundles that declare no framework (the common case).
  • Honest ordering & no false positives. The shape check runs before the python/node language gate, so an .html/.vue module lands on the specific "UI module" label instead of the vaguer "can't tell how to run this". It matches the last path segment's extension only — .py/.js/.ts CLIs (even under a v1.2/ dir) never trip it — and poisoned (../, absolute, -flag) paths are never trusted.
  • Deferred-state label = a future affordance, not a working button. Both the v2 run console (RunConsoleStageView) and the legacy RunConsoleView render a neutral (never red) "Runnable here: not yet — UI module / Output is a UI surface. In-browser launch is coming in a later phase." with Call-it as the place to run it today.
  • Adds a GUNK_DEBUG_RUN_CONSOLE=uimodule screenshot hook and a reference capture (docs/design/explorations/module-run-v2-ui-module.png); updates the T-10.13 status in the phase doc and the CHANGELOG.

No new store state — this is a derived classification only, per the task's "do not invent store state beyond a derived flag" guidance.

UI-module deferred affordance

Test plan

  • swift build — clean
  • swift test — 243 passing, 1 sandbox-availability skip
  • New SmokeRunnerTests: entrypoint-shape detection (jsx/tsx/vue/svelte/astro), HTML on a non-runnable language, poisoned ../app.jsxcannotDetermine, dotted-dir v1.2/parser.py stays terminalRunnable
  • Screenshot of the deferred UI-module state captured
  • (Deferred to the launch phase) Human-in-the-loop: a real UI module opens in the external browser

Out of scope (deferred)

Serving the surface + NSWorkspace.open(url) and the "launching browser" state — these ship in the follow-up phase per the 2026-06-15 mid-phase revision.

Made with Cursor

…10.13)

Finishes the deferred slice of T-10.13: detect UI modules and label them
honestly. The runnability classifier now also keys on entrypoint shape — a
safe entrypoint ending in .jsx/.tsx/.vue/.svelte/.astro/.html/.htm — not just
a declared UI framework in requirements:, so hand-extracted UI bundles that
declare no framework are still classified. The shape check runs before the
python/node language gate so an .html/.vue module lands on the specific
"UI module" label rather than the vaguer "can't tell how to run this"; it
matches the last path segment's extension only (so .py/.js/.ts CLIs, even
under a v1.2/ dir, never trip it) and never trusts poisoned paths.

The page renders the deferred state as a neutral (never red) "Runnable here:
not yet — UI module / In-browser launch is coming in a later phase." in both
the v2 run console and the legacy view; the actual in-browser launch stays
deferred. Adds SmokeRunnerTests for the shape, the non-runnable-language HTML
path, the poisoned path, and the dotted-dir false-positive guard, plus a
GUNK_DEBUG_RUN_CONSOLE=uimodule screenshot hook. Build + tests green
(243 passing, 1 sandbox-availability skip).

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploy Preview for velvety-moxie-c6d22b canceled.

Name Link
🔨 Latest commit 344f255
🔍 Latest deploy log https://app.netlify.com/projects/velvety-moxie-c6d22b/deploys/6a31ca5d17741a000822511f

@Mkohler4
Mkohler4 merged commit 1a31a83 into main Jun 16, 2026
13 of 16 checks passed
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