fix(intent): don't mislabel backend app/ code as web work#26
Merged
Conversation
A fresh verification pass caught that WEB_DIR included ambiguous roots (`app`, `public`, `client`), and web was classified before api — so a FastAPI/Rails `app/routes.py` with `@app.get` was labeled "web" and the agent was told to screenshot a backend server. Web now wins only on a STRONG signal (a real web extension or a DOM idiom); a mere UI-ish directory yields to a detected API. WEB_DIR is trimmed to genuine UI source dirs. Also: for web, prefer the dev-tool's default URL over a stray listen() port in the diff. +3 regression tests; 141 pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Follow-up to #25 — the squash merged before this commit landed, so
main'ssrc/intent.tsis missing it.A fresh verification pass on #25 caught that
WEB_DIRincluded ambiguous roots (app,public,client) and web was classified before api — so a FastAPI/Railsapp/routes.pywith@app.getwas labeled web and the agent was told to screenshot a backend server.Fix: web wins only on a strong signal (a real web extension or a DOM idiom); a mere UI-ish directory yields to a detected API.
WEB_DIRtrimmed to genuine UI source dirs. Also: for web, prefer the dev-tool's default URL over a straylisten()port in the diff.Verified on the built dist:
app/routes.py+@app.get→ api,app/page.tsx→ web,public/robots.txt→ generic. +3 regression tests; 141 pass, typecheck + biome clean.Should land before tagging
v0.6.0.🤖 Generated with Claude Code