usabl init: support monorepos and non-root app directories
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript, vite
- 領域
- testing-qa, tooling
調査の方向性
Start by reading the usabl init discovery code and the Vite and router lookup paths; the issue names platform/vite.config.ts, framework/vite.config.ts, and the runtime route assembly in platform/main/PlatformRoutes.tsx. Reproduce the empty draft on a monorepo, then check how discovery reports missing routes and empty uiFileGlobs. Done means init produces a usable draft for a named workspace or explains why it refuses and gives the manual next step, while preserving the single-app path.
索引モデルが issue の本文から書いたものです。
説明
usabl init assumes a single application at the repository root. On a monorepo it finds neither the Vite config nor the router, writes an empty draft, and leaves the whole config to be hand-authored.
Found while dogfooding on a real second project (#110): ansible/ansible-ui at devel, a PatternFly 6.3.1 monorepo.
What happened
$ usabl init
Wrote usabl.config.json, usabl.routes.json.
Review: no Vite config found; using http://127.0.0.1:5173.
Review: no router file found. Routes sidecar will be empty.
Review: these files are drafts. Merge only after you check routes, globs, and URLs.
The drafts came out with uiFileGlobs: [], surfaces: [], and routes: []. A config in that state resolves to nothing to check, so the gate reports idle on every change.
Why it happened
Two separate assumptions, both reasonable for a single-app repo and both wrong here.
-
Vite config lookup is root-only. This repo's config is at
platform/vite.config.ts, and there is a second one atframework/vite.config.ts. init looked at the root, found nothing, and fell back to the default port. The real dev server runs on 4100 over https, not 5173 over http, so the fallback URL is wrong in three ways at once. -
Router discovery expects a static route file. This repo composes routes at runtime from hooks (
platform/routes/useGetPlatform*Routes.tsx, assembled inplatform/main/PlatformRoutes.tsx), and the path values are relative fragments joined into a tree. There is no file a static reader can parse into absolute URLs.
What it got right
It refused to guess. Every failed inference printed a Review: line naming what it could not determine, and it wrote empty collections rather than inventing routes. A wrong route map would have been worse than a missing one, and the honesty invariant held. This issue is about reach, not about correctness.
Proposed direction
Not a design decision yet, just the options as they look from here.
- Detect nested Vite configs and, when more than one is found, refuse and print the candidates for the operator to choose rather than picking one.
- Read the resolved dev server port and protocol from the chosen Vite config instead of assuming the default, since
server.portand https are both set explicitly here. - Accept an operator-supplied application subdirectory, so
usabl init --app platformscopes discovery to one workspace. - When routes cannot be derived statically, say so explicitly and point at the manual surface mapping path, rather than writing an empty sidecar that silently reads as idle.
- Consider whether an empty
uiFileGlobsshould be a refusal rather than a draft, since the resulting config cannot ever produce a verdict.
Acceptance
usabl initon a monorepo either produces a usable draft for a named workspace or refuses with the reason and the manual next step.- A config that can never produce a verdict is not written silently.
- The existing single-app path is unchanged.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 2時間 48分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
usabl-dev/usabl のほかの issue
-
area: engine bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
Stop hook allows a stop on an unknown verdict, and the self-check prints IDLE for a null verdictオープンarea: assistants bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
area: engine bug security
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Overlay: browser context failures are counted per plugin, not per browser, and close is not sharedオープンarea: overlay bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
area: engine enhancement performance
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
usabl-dev/usabl の issue をすべて見る
似ている issue
-
bug skills
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
equinor/fusion-framework#5846 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Eyevinn/open-videocore#1256 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Theme preset geist points at undefined --font-geist対応中かも @claude が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信