usabl init picks one entry file silently when several candidates exist
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #347 by @eparenti — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start in src/init/index.ts at resolveEntryFile and trace how usabl init builds the usabl.routes.json draft. Check the existing tests for route discovery and ambiguous candidates, if present. When several supported extensions exist for one route, the draft should leave its entry file empty and include a Review: note naming every candidate.
Written by the indexing model from the issue text.
Description
What happens
resolveEntryFile in src/init/index.ts looks for a route's component file by trying .tsx, .ts, .jsx, and .js in that order, and takes the first one that exists. When more than one exists for the same name, it picks one without saying so, and usabl init writes that file into the usabl.routes.json draft.
Why it matters
The routes sidecar is authoritative once it is committed. A wrong entry file maps changes to the wrong screen: a change to the real component may not queue its screen. This is the same "do not pick one silently" problem that import resolution had for .vue and .svelte siblings.
Expected
When more than one candidate exists, init leaves the entry file empty for that route and writes a Review: note that names every candidate.
Status
Found while building the parser-based router discovery. This is old behavior.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 6h 42m
- Merged PRs (30d)
- 44
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from usabl-dev/usabl
-
area: engine enhancement performance
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Scan browser runs without Chromium's sandboxPossibly taken @eparenti claimed this today. Openarea: engine security
Difficulty 4/5 3-5 days Newbie friendliness 46/100
Maintainers usually reply within 1 day
-
area: engine enhancement performance
Difficulty 4/5 1-2 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
area: engine enhancement performance
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
fix(worker): keep normal prepare waiting states failure-freePossibly taken @LichKing-2234 claimed this today. Openagent:codex priority:P1
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AgoraIO-Extensions/agent-infra#3745 ·
Maintainers usually reply within 1 day
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framingPossibly taken @Eapp1e claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
makecindy/cindy#7973 · 1 comment ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lingdojo/kana-dojo#33337 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
code-yeongyu/senpi#4917 · 1 comment ·
Maintainers usually reply within 1 day