Skip to content

fix(mobile): name admins in organization permission notices - #8165

Merged
iscekic merged 4 commits into
mainfrom
drain/mobile-org-permission-copy
Oct 22, 2026
Merged

iscekic merged 4 commits into
mainfrom
drain/mobile-org-permission-copy

Conversation

@iscekic

@iscekic iscekic commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Organization admin holds the same authority as an owner on every surface in packages/app-shared/src/organizations/roles.ts (ORGANIZATION_BILLING_ROLES, and ORGANIZATION_MANAGE_ROLES for GitHub installs), but the mobile permission notices named only "organization owners and billing managers". This change names admins wherever the server accepts them, and makes each connect notice match its provider's real gate.

  • Security Agent settings banner, disabled notice, dismiss notice, audit-report notice, review memory notice, and the members invite notice: organization owners, admins, and billing managers (all gated by ORGANIZATION_BILLING_ROLES).
  • Audit-report second sentence: "Ask an owner, admin, or billing manager…".
  • GitHub connect notice: owners and admins (GitHub App install is ORGANIZATION_MANAGE_ROLES).
  • New codeReviewer.gitlab.notConnectedReadOnly: asks an organization owner, admin, or billing manager to connect it, without claiming exclusive access, because GitLab's first connect route admits any member and reconnect admits billing roles. The screen picks it for the GitLab platform.
  • Bitbucket connect notice: owners, admins, and billing managers (organizations.bitbucket.connect is organizationBillingProcedure).
  • All 86 non-English catalogs carry the new values and the new key, so the reported Hindi case is fixed in the app, not only in English.

Server gates

Copy key Server gate Admin accepted
securityAgent.sla.permissionNote organizationBillingProcedure / …MutationProcedure yes
securityAgent.settingsOverview.disabledNoManage canManageSecurityAgent → canManageOrganizationBilling yes
securityAgent.dismiss.cannotDismissDescription organizationBillingMutationProcedure (dismissFinding) yes
securityAgent.auditReport.unavailableDescription organizationBillingProcedure (getAuditReport) yes
codeReviewer.reviewMemory.readOnlyDescription reviewMemory.setEnabled → ORGANIZATION_BILLING_ROLES yes
codeReviewer.notConnectedReadOnly (GitHub) GitHub install callback → ORGANIZATION_MANAGE_ROLES yes, billing manager no
codeReviewer.gitlab.notConnectedReadOnly (new) GitLab connect: any member first connect, billing roles on reconnect no role claim
codeReviewer.bitbucket.notConnectedReadOnly organizations.bitbucket.connect → organizationBillingProcedure yes
organization.members.emptyDescriptionCannotInvite mobile isMoneyRole = canManageOrganizationBilling yes

Verification

  • pnpm --filter kilo-app check:i18n → check-catalogs: 87 languages, every catalog matches en.json
  • node tools/i18n/check-plurals.mjs → every counted message and locale declares its plural categories
  • pnpm --filter kilo-app exec vitest run src/i18n src/components/security-agent src/components/code-reviewer src/components/organization → 56 files, 2151 tests passed
  • pnpm --filter kilo-app run typecheck, pnpm --filter kilo-app run lint, pnpm --filter kilo-app format:check → clean
  • Throwaway runtime i18n smoke (deleted before commit): changeLanguage('hi') rendered the settings notice containing "एडमिन" for admins and bound {{platform}} in both connect strings; English and Hindi resolved every changed key with no placeholder left unbound.
  • Android emulator (omp36, dev client from the mobile-native-android artifact) against the local dev stack, signed in with an owned fake account whose organization membership role is member:
    • Profile → Security Agent → Settings → Models & analysis shows "Only organization owners, admins, and billing managers can change these settings."
    • The same screen after switching the app language to Hindi shows "केवल संगठन के मालिक, एडमिन और बिलिंग प्रबंधक ही ये सेटिंग बदल सकते हैं।" — the reported surface, now naming admins.
    • Screenshots are attached in a follow-up comment.

Proxy answers

The owner's proxy gave these answers in the owner's place.

  1. Question: Surface verification: the brief says "Verify on iOS" and the item is labeled explorer:ios, but the i18n skill says copy-only catalog changes need no native surface proof. Which level?
    Answer: Full iOS proof path (Recommended)
    Confidence: 0.75 · Precedent: Proof and verification: valid e2e proof is required on every PR (session 55c9c80332a7, "logs and/or screenshots are mandatory proof"). An iOS lane opens only when it is asked for (session 2f71af3a787e, "iOS lane must specifically be asked for"), and this brief asks for iOS.
  2. Question: GitHub connect accepts only owners/admins (ORGANIZATION_MANAGE_ROLES), so naming billing managers there already overstates authority. Confirm the fix still names all three roles in the two connect strings?
    Answer: Name only owners and admins on connect strings
    Confidence: 0.60 · Precedent: Autonomy: if you see a gap or an error, fix it (session 89824a222897, "if you saw a gap, fix it"). Also fix the class, not the symptom (session 00eb2a1d3e4b). The copy should match the actual server check.
  3. Question: The audit-report string's second sentence says "Ask an owner or billing manager to grant you access." Update it to "Ask an owner, admin, or billing manager" too?
    Answer: Yes, add admin there too (Recommended)
    Confidence: 0.85 · Precedent: Fix the class of the issue on every affected surface (session 75f8833fe8c1, "fix this for all ... on all surfaces").
  4. Question: Connect copy: Server facts: GitHub App install requires owner/admin (ORGANIZATION_MANAGE_ROLES); GitLab's connect route allows any member on a first connect and owner/admin/billing_manager on reconnect; Bitbucket's connect mutation requires owner/admin/billing_manager. The GitHub and GitLab screens share one string (codeReviewer.notConnectedReadOnly); Bitbucket has its own. Your earlier answer was "name only owners and admins on connect strings". How should the connect notices read?
    Answer: Split per provider
    Confidence: 0.55 · Precedent: Fix the root cause and the class of the issue on every affected surface (session 00eb2a1d3e4b: "fix the class"). The earlier owners-and-admins answer predates the per-provider server facts. Each string should match its server check.
  5. Question: Invite notice: The organization members empty state also omits admins: organization.members.emptyDescriptionCannotInvite says "Ask an owner or billing manager to invite teammates." while mobile canInvite is isMoneyRole (owner/admin/billing_manager). Include it in this fix?
    Answer: Include it
    Confidence: 0.85 · Precedent: If you see a gap or an error, fix it (session 89824a222897: "if you saw a gap, fix it"). It is the same false-copy class and the same role authority.
  6. Question: Proof surface: This branch changes only JavaScript copy: no iOS-only code, Platform.OS, keyboard, safe area, or truncation lines. The ios_lane tool refuses a lease for changes that are not iOS-specific, and the session rules say to prove other mobile changes on the Android emulator. Your earlier answer chose the full iOS proof path. Which proof?
    Answer: Android emulator + runtime i18n smoke
    Confidence: 0.60 · Precedent: Use Android on the work VM by default and open an iOS lane only when the agent asks for it (session 2f71af3a787e: "iOS lane must specifically be asked for by the agent, otherwise android is used on the vm"). The change is copy-only, and a refused lease call is wasted work.

@iscekic iscekic added drain Work item from the findings drain explorer:ios Finding surfaced by the iOS explorer labels Oct 19, 2026
@iscekic

iscekic commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Verified on the Android emulator (omp36) against the local dev stack, signed in with an owned fake account whose organization membership role is member.

  • English: Profile → Security Agent → Settings → Models & analysis shows "Only organization owners, admins, and billing managers can change these settings."
  • Hindi (app language): the same banner shows "केवल संगठन के मालिक, एडमिन और बिलिंग प्रबंधक ही ये सेटिंग बदल सकते हैं।"

Both captures show only the affected settings screen; no account or organization data is visible.

English Models and analysis banner naming owners, admins, and billing managers

Hindi Models and analysis banner naming owners, admins, and billing managers

Comment thread apps/mobile/src/i18n/locales/pl.json Resolved
Comment thread apps/mobile/src/i18n/locales/mg.json Resolved
@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The follow-up commit resolves all four prior findings: the Polish and Malagasy GitHub notices now name only owners and admins, the GitLab notice is actionable for read-only viewers (with the selector extracted so the mounted test exercises the real function), and the provider-table test asserts the concrete GitLab copy. The 87 catalogs all parse, carry {{platform}}, and none are left in English.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Files Reviewed (91 files)
  • apps/mobile/src/components/code-reviewer/connect-notice-key.ts - new selector, no issues
  • apps/mobile/src/components/code-reviewer/platform-overview-rows.ts - selector moved out, imports trimmed, no issues
  • apps/mobile/src/components/code-reviewer/platform-overview-screen.tsx - no issues (prior GitLab finding fixed)
  • apps/mobile/src/components/code-reviewer/platform-overview-screen.mounted.test.tsx - real selector now used, GitLab expectation updated (prior suggestion addressed)
  • apps/mobile/src/components/code-reviewer/review-memory-screen.mounted.test.tsx - no issues
  • apps/mobile/src/components/security-agent/scope-entry-screen.test.ts - no issues
  • apps/mobile/src/components/security-agent/settings-overview-screen.mounted.test.tsx - no issues
  • apps/mobile/src/i18n/locales/en.json - no issues
  • apps/mobile/src/i18n/locales/pl.json, mg.json - GitHub notice now owners/admins (prior findings fixed)
  • 84 other locale catalogs - GitLab notice updated, valid JSON, {{platform}} preserved, no untranslated English

Notes: copy-only change; the new selector holds no state, so there is no memory-leak surface. All 87 catalogs parse and contain both notConnectedReadOnly keys.

Previous Review Summary (commit b36b26c)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit b36b26c)

Status: 4 Issues Found | Recommendation: Address before merge

Executive Summary

Two locale catalogs (Polish, Malagasy) still name billing managers in the GitHub connect notice, and the new GitLab notice tells read-only members to connect while the screen hides the connect card.

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/i18n/locales/pl.json 922 GitHub connect notice still names billing managers; GitHub install is ORGANIZATION_MANAGE_ROLES (owner/admin only) and the English copy drops billing managers
apps/mobile/src/i18n/locales/mg.json 1470 Same: GitHub connect notice still names billing managers (ny mpitantana ny faktiora)
apps/mobile/src/components/code-reviewer/platform-overview-screen.tsx 144 GitLab notice says "Connect it to start reviewing merge requests" but this branch renders only when canEdit is false and shows no connect card, even though the GitLab first-connect route admits any member

SUGGESTION

File Line Issue
apps/mobile/src/components/code-reviewer/platform-overview-screen.mounted.test.tsx 66 The mocked connectNoticeKey duplicates the production selector, so the new provider table test cannot catch a regression in the real function
Files Reviewed (93 files)
  • apps/mobile/src/components/code-reviewer/platform-overview-rows.ts - no issues
  • apps/mobile/src/components/code-reviewer/platform-overview-screen.tsx - 1 issue
  • apps/mobile/src/components/code-reviewer/platform-overview-screen.mounted.test.tsx - 1 issue
  • apps/mobile/src/components/code-reviewer/review-memory-screen.mounted.test.tsx - no issues
  • apps/mobile/src/components/security-agent/scope-entry-screen.test.ts - no issues
  • apps/mobile/src/components/security-agent/settings-overview-screen.mounted.test.tsx - no issues
  • apps/mobile/src/i18n/locales/en.json - no issues
  • apps/mobile/src/i18n/locales/pl.json - 1 issue
  • apps/mobile/src/i18n/locales/mg.json - 1 issue
  • 84 other locale catalogs (af … zu) - verified all 9 changed keys present in all 87 catalogs, every GitLab string carries {{platform}}, JSON parses, no untranslated English leftovers, all role sets otherwise match the English source

Notes: copy-only change, no memory-leak surface. Server gates verified for the role claims (ORGANIZATION_BILLING_ROLES for security-agent/settings/audit/dismiss/review-memory/invite/Bitbucket, ORGANIZATION_MANAGE_ROLES for GitHub install).

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash-1017 · Input: 52.5K · Output: 7.6K · Cached: 763.9K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added merge:human Substantive functional risk requires human review. merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. and removed merge:human Substantive functional risk requires human review. labels Oct 19, 2026
@iscekic iscekic added merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. and removed merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. labels Oct 21, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 21, 2026
…ission-copy

# Conflicts:
#	apps/mobile/src/components/code-reviewer/review-memory-screen.mounted.test.tsx
#	apps/mobile/src/i18n/locales/af.json
#	apps/mobile/src/i18n/locales/am.json
#	apps/mobile/src/i18n/locales/ar.json
#	apps/mobile/src/i18n/locales/az.json
#	apps/mobile/src/i18n/locales/be.json
#	apps/mobile/src/i18n/locales/bg.json
#	apps/mobile/src/i18n/locales/bn.json
#	apps/mobile/src/i18n/locales/bs.json
#	apps/mobile/src/i18n/locales/ca.json
#	apps/mobile/src/i18n/locales/ckb.json
#	apps/mobile/src/i18n/locales/cs.json
#	apps/mobile/src/i18n/locales/cy.json
#	apps/mobile/src/i18n/locales/da.json
#	apps/mobile/src/i18n/locales/de.json
#	apps/mobile/src/i18n/locales/el.json
#	apps/mobile/src/i18n/locales/en.json
#	apps/mobile/src/i18n/locales/es.json
#	apps/mobile/src/i18n/locales/et.json
#	apps/mobile/src/i18n/locales/eu.json
#	apps/mobile/src/i18n/locales/fa.json
#	apps/mobile/src/i18n/locales/fi.json
#	apps/mobile/src/i18n/locales/fil.json
#	apps/mobile/src/i18n/locales/fr.json
#	apps/mobile/src/i18n/locales/ga.json
#	apps/mobile/src/i18n/locales/gl.json
#	apps/mobile/src/i18n/locales/gu.json
#	apps/mobile/src/i18n/locales/ha.json
#	apps/mobile/src/i18n/locales/he.json
#	apps/mobile/src/i18n/locales/hi.json
#	apps/mobile/src/i18n/locales/hr.json
#	apps/mobile/src/i18n/locales/ht.json
#	apps/mobile/src/i18n/locales/hu.json
#	apps/mobile/src/i18n/locales/hy.json
#	apps/mobile/src/i18n/locales/id.json
#	apps/mobile/src/i18n/locales/ig.json
#	apps/mobile/src/i18n/locales/is.json
#	apps/mobile/src/i18n/locales/it.json
#	apps/mobile/src/i18n/locales/ja.json
#	apps/mobile/src/i18n/locales/ka.json
#	apps/mobile/src/i18n/locales/kk.json
#	apps/mobile/src/i18n/locales/km.json
#	apps/mobile/src/i18n/locales/kn.json
#	apps/mobile/src/i18n/locales/ko.json
#	apps/mobile/src/i18n/locales/lo.json
#	apps/mobile/src/i18n/locales/lt.json
#	apps/mobile/src/i18n/locales/lv.json
#	apps/mobile/src/i18n/locales/mg.json
#	apps/mobile/src/i18n/locales/mi.json
#	apps/mobile/src/i18n/locales/mk.json
#	apps/mobile/src/i18n/locales/ml.json
#	apps/mobile/src/i18n/locales/mn.json
#	apps/mobile/src/i18n/locales/mr.json
#	apps/mobile/src/i18n/locales/ms.json
#	apps/mobile/src/i18n/locales/mt.json
#	apps/mobile/src/i18n/locales/my.json
#	apps/mobile/src/i18n/locales/nb.json
#	apps/mobile/src/i18n/locales/ne.json
#	apps/mobile/src/i18n/locales/nl.json
#	apps/mobile/src/i18n/locales/om.json
#	apps/mobile/src/i18n/locales/or.json
#	apps/mobile/src/i18n/locales/pa.json
#	apps/mobile/src/i18n/locales/pl.json
#	apps/mobile/src/i18n/locales/ps.json
#	apps/mobile/src/i18n/locales/pt-BR.json
#	apps/mobile/src/i18n/locales/pt.json
#	apps/mobile/src/i18n/locales/ro.json
#	apps/mobile/src/i18n/locales/ru.json
#	apps/mobile/src/i18n/locales/si.json
#	apps/mobile/src/i18n/locales/sk.json
#	apps/mobile/src/i18n/locales/sl.json
#	apps/mobile/src/i18n/locales/so.json
#	apps/mobile/src/i18n/locales/sq.json
#	apps/mobile/src/i18n/locales/sr.json
#	apps/mobile/src/i18n/locales/sv.json
#	apps/mobile/src/i18n/locales/sw.json
#	apps/mobile/src/i18n/locales/ta.json
#	apps/mobile/src/i18n/locales/te.json
#	apps/mobile/src/i18n/locales/th.json
#	apps/mobile/src/i18n/locales/tr.json
#	apps/mobile/src/i18n/locales/uk.json
#	apps/mobile/src/i18n/locales/ur.json
#	apps/mobile/src/i18n/locales/uz.json
#	apps/mobile/src/i18n/locales/vi.json
#	apps/mobile/src/i18n/locales/yo.json
#	apps/mobile/src/i18n/locales/zh-Hans.json
#	apps/mobile/src/i18n/locales/zh-Hant.json
#	apps/mobile/src/i18n/locales/zu.json
@iscekic iscekic added merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. and removed merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. labels Oct 22, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit a2b69c7 Oct 22, 2026
46 checks passed
@iscekic
iscekic deleted the drain/mobile-org-permission-copy branch October 22, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drain Work item from the findings drain explorer:ios Finding surfaced by the iOS explorer merge:bot Bot-owned review; merge when ready once readiness passes and a review approves.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants