chore: enforce figma links in relevant prs - #1236
Conversation
jvsena42
left a comment
There was a problem hiding this comment.
Non-blocking — nothing in CI reads the PR body (both repos' claude-code-review.yml are workflow_dispatch-only with a required pr_number, and no workflow greps for figma, ### Design, or the body at all), so this is advisory, which the text correctly says.
#1237 merged to master at 10:17 today and this branch now conflicts in AGENTS.md. Master added, at the same insertion point this PR targets:
- ALWAYS resolve a changed *Screen.kt to its Figma frame through docs/screens-map.md ... (todo when the design does not exist yet); ScreensMapTest fails otherwise
Worth reconciling on rebase rather than landing both, because the merge also changes what the guidance here should say. docs/screens-map.md on master is no longer the RN↔Compose filename table — it now carries 37 Figma references across 155 screen rows, 141 of them pointing at a real Flow › Frame, with todo/n/a for the rest, and the header names both the file key and the Bitkit - Handoff vNN page. ScreensMapTest guarantees every screen has a row.
Two knock-ons for the wording:
N/A — no design available.(pr.md:164,AGENTS.md:190,template:12) is currently a self-declared opt-out with nothing to check it against. Post-merge it can be tied to the map: the row is markedtodo. That turns it from an assertion into something a reviewer can verify, and it matters becauseAGENTS.md:193explicitly exemptsN/Acases from the one advisory request — so today the zero-effort branch is the one shielded from review. Scoping the exemption toN/A — no UI changes.and pointing the design case at the map'stodomarker closes it in one line.- "missing or uncertain screens-map entries" (
pr.md:166) now describes a stateScreensMapTestmakes impossible on Android.
Separately, and outside this diff: .agents/commands/release.md:116-131 hardcodes a PR body with Description / Preview / QA Notes and no ### Design, so release PRs bypass the new section. Line 111 does say to read the template first, so it's a mixed signal rather than a flat contradiction. greptile raised the same gap on the iOS twin (synonymdev/bitkit-ios#734) but not here.
jvsena42
left a comment
There was a problem hiding this comment.
All four points from my last pass are closed — thanks.
- The #1237 conflict is reconciled cleanly: master's rule survives verbatim at
AGENTS.md:188and the new bullets hang off it, so the rule is stated once rather than duplicated. N/Ais now anchored to the map::191scopes it totodo/n/arows and:194gates the exemption on Valid. That closes the loophole — validity is checkable against a row now.- The impossible "missing screens-map entries" wording is gone, replaced by a state that is actually reachable given
docs/screens-map.md:10. release.md:124-126emits### Design, in template order.
One thing the follow-up narrowed further than I think you intended — inline.
Cross-repo: the iOS twin went the opposite way (synonymdev/bitkit-ios#734). It kept the broad scope but left the N/A exemption unqualified. Between the two of you the end state each wants is the other's half, and both are one-liners.
jvsena42
left a comment
There was a problem hiding this comment.
One LOW inline. These are instruction documents — nobody executes them, but agents and humans follow them, so a wrong rule gets executed many times. That's the lens I used.
Verified sound:
docs/screens-map.mdvsScreensMapTest— the test matchesRegex("""\b[A-Z]\w*Screen\.kt\b""")against the file text and compares that set with*Screen.ktfilenames underapp/src/main/java. Both edited rows keep their filename cell unchanged and no row was added or removed, so the Figma column is outside what the test reads. Not at risk.- Both new frame references are real. I checked them against Figma file
ltqvnKiejWj0JQiqtDf2JJ, pageBitkit - Handoff v62(the only handoff page):Payment Request Details(46920:240340) andSubscriptions overview(46920:239663) are both top-level frames under theSubscriptionsSectionTitle(46920:239660). So:74and:124are correct in the map'sFlow › Frameconvention — including the cross-package case whereIncomingPaymentRequestDetailsScreen.ktlives inui/screens/paymentrequestsbut resolves to a frame in theSubscriptionsflow. - No conflict with the existing rule at
AGENTS.md:188. The new:190says "Start withdocs/screens-map.mdfor mapped screens" and:191reuses the sametodo/n/amarkers the map already defines atdocs/screens-map.md:8— the rule is extended, not duplicated. That was the thing most likely to go wrong here. - No unbacked enforcement claim.
AGENTS.md:194andpr.md:168both say missing links never block approval or CI, and that matches reality — none of the nine files in.github/workflowsreferences the template,### Design, orfigma. - Literal strings are byte-identical across every surface that emits or consumes them, em dash and trailing period included: template
:12/:13,AGENTS.md:191/:192/:194,pr.md:164/:165/:168,release.md:126.release.md's body order matches the template (Description → Design → Preview → QA Notes). - All agent surfaces receive the rule —
CLAUDE.mdandGEMINI.mdare symlinks toAGENTS.md,.cursor/commands/pr.mdsymlinks to.agents/commands/pr.md, and.cursor/rules/*.mdccarry code-style rules only, so nothing there needs a parallel edit.
Drift vs synonymdev/bitkit-ios#734: mostly justified rather than accidental. Android points at docs/screens-map.md first and adds the mapped-todo/n/a → N/A — no design available. rule; iOS has no such map, so it points only at the handoff page and omits that rule. Android deliberately drops "missing" from the uncertain-frame clause (the map makes a missing frame unreachable) where iOS says "Missing or uncertain". Two genuine inconsistencies worth a look: android's pr.md:168 says links never block "approval, CI, PR creation, or review readiness" where every other surface on both repos says just "approval or CI"; and android scopes the advisory request "per PR" where iOS doesn't scope it at all.
jvsena42
left a comment
There was a problem hiding this comment.
Fix confirmed at 69a750a1, and the cross-repo drift closed with it.
.agents/commands/pr.md:162 now reads "Include ### Design when the PR template contains a ### Design heading, and apply exactly one case:" — which matches the file's own conditional-section pattern at :204/:205, so the travelling case at :170 (library repos, and bitkit-android-bark's own copy against a template with no ### Design) is handled.
AGENTS.md:189 still says "ALWAYS fill the PR ### Design section", and that's correct rather than a half-applied fix: AGENTS.md is repo-local and this repo's template does carry the heading, so both layers resolve identically. iOS has the same two-layer shape.
On the second change — I was going to query it, and I was wrong to. You propagated the longer "approval, CI, PR creation, or review readiness" wording into AGENTS.md:194, and I'd flagged that phrasing as the odd one out. Checking the twin at synonymdev/bitkit-ios#734, ovitrif adopted the same long form on both iOS surfaces. git grep "approval or CI" now returns zero hits in both repos — four surfaces, one wording. So this converged the two repos rather than widening the gap, which is the better outcome and the opposite of what I assumed.
The other inconsistency I raised is closed too: iOS adopted "per PR" scoping for the advisory request.
The one remaining difference is deliberate and I'm not asking you to match it — this repo drops "missing" from the uncertain-frame clause because docs/screens-map.md makes a missing frame unreachable, while iOS keeps "Missing or uncertain" since it has no map. Correct on both sides.
Both my findings are resolved. Clean from my side.
Closes #1234
This PR adds a Design section to the pull request workflow so applicable UI changes reference their Figma frames and all other changes use an explicit N/A case.
Description
/prguidance to the tested screens map, including itstodoandn/acases.Design
N/A — no UI changes.
Preview
N/A — no user-visible changes.
QA Notes
Manual Tests
N/A
Automated Checks
just test file "to.bitkit.docs.ScreensMapTest"andgit diff --check; verified mapped designs, valid no-design markers, non-UI changes, uncertain matches, and omitted applicable links.