feat(app): detect UI modules by entrypoint shape + deferred label (T-10.13) - #181
Merged
Conversation
…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>
✅ Deploy Preview for velvety-moxie-c6d22b canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).
RunnabilityClassifierflags a.uiModulewhen a safe entrypoint ends in.jsx/.tsx/.vue/.svelte/.astro/.html/.htm, in addition to the pre-existingrequirements:UI-framework list. This catches hand-extracted UI bundles that declare no framework (the common case)..html/.vuemodule 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/.tsCLIs (even under av1.2/dir) never trip it — and poisoned (../, absolute,-flag) paths are never trusted.RunConsoleStageView) and the legacyRunConsoleViewrender 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.GUNK_DEBUG_RUN_CONSOLE=uimodulescreenshot 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.
Test plan
swift build— cleanswift test— 243 passing, 1 sandbox-availability skipSmokeRunnerTests: entrypoint-shape detection (jsx/tsx/vue/svelte/astro), HTML on a non-runnable language, poisoned../app.jsx→cannotDetermine, dotted-dirv1.2/parser.pystaysterminalRunnableOut 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