Skip to content

fix(mobile): label the variable reveal control as an action - #8473

Merged
iscekic merged 5 commits into
mainfrom
drain/reveal-toggle-action-label
Oct 21, 2026
Merged

iscekic merged 5 commits into
mainfrom
drain/reveal-toggle-action-label

Conversation

@iscekic

@iscekic iscekic commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Change

  • The reveal control on a secret environment-variable row (the manual editor in the new-session advanced configuration) now announces the action it performs. It was labelled with profiles.secretLabel, the noun "Secret"; it now uses profiles.secrets.reveal, the same copy the edit-form reveal toggle (profile-variables-rows.tsx:245) and the backend headers field (backend-headers-field.tsx:50) use.
  • profiles.secretLabel had no other source use after the change, so it is removed from en.json and all 86 non-English catalogs. The catalog check rejects an English key that no source file references.
  • Regression test: apps/mobile/src/components/agents/advanced-config-panel.mounted.test.tsx adds a secret variable and asserts the row control announces the reveal action and reveals the draft value when pressed. With the previous label the test fails (Reveal value control missing); with this change it passes.

Not changed: the edit-form toggle keeps one label for both states and conveys state through accessibilityState.selected, matching the backend headers field.

Verification

Unit and static checks:

  • pnpm --filter kilo-app check:i18n — check-catalogs: 87 languages, every catalog matches en.json.
  • pnpm --filter kilo-app exec vitest run src/components/agents/advanced-config-panel.mounted.test.tsx — 11 passed.
  • pnpm --filter kilo-app exec vitest run src/components/profiles/profile-variables-screen.mounted.test.tsx src/components/profiles/profile-variables-model.test.ts src/components/agents/advanced-config-panel.mounted.test.tsx src/i18n — 1647 passed.
  • pnpm --filter kilo-app test — full mobile suite.
  • pnpm --filter kilo-app typecheck, pnpm --filter kilo-app lint — clean.
  • Each catalog diff is exactly one deleted line; all 87 files still parse as JSON.

Android emulator end-to-end on the local dev stack (dev-client from the CI native artifact, local Postgres, fake test account, app language Khmer to match the reported locale):

  1. Opened a new coding task, expanded Advanced Configuration, added a variable, marked it secret, saved.
  2. uiautomator dump of the variable row before the change:
    class="android.widget.Button" content-desc="សម្ងាត់" bounds="[823,1328][924,1429]"
    (the "Secret" noun; English build: content-desc="Secret").
  3. After a Metro restart and a full app relaunch on the new bundle (Android Bundled … apps/mobile/index.js (8242 modules)), the same row control:
    class="android.widget.Button" content-desc="បង្ហាញតម្លៃ" bounds="[823,1328][924,1429]"
    — the reveal action, matching the edit form's control in the same locale.
  4. Pressing the control set selected="true" on the node and made the draft value visible in the row, so the action still works.

The change affects only the announced label; the row's pixels are unchanged, so screenshots cannot show it. The accessibility tree dumps above are the evidence.

Main-side CI repair

main currently fails mobile-test (5/8): the to-do list settings sheet subscribes to the
Android back press, and todo-list-model-picker.mounted.test.tsx's react-native mock does
not export BackHandler, so the shard dies with No "BackHandler" export is defined on the "react-native" mock. The same shard fails on main itself (run on the current main head).
This branch merges main and adds that export to the test mock (one line) so the shard can
run; vitest run --shard=5/8 passes locally with 153 files and 2021 tests.

Proxy answers

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

  1. Question: How should the row-level reveal toggle announce itself?
    Answer: Reuse profiles.secrets.reveal (Recommended)
    Confidence: 0.85 · Precedent: Keep similar elements consistent across surfaces: the owner asked that the thought row match the tool call row.
  2. Question: profiles.secretLabel loses its only source use after the label change. What should happen to the key?
    Answer: Remove it from all catalogs (Recommended)
    Confidence: 0.90 · Precedent: Remove obsolete code rather than keep it alongside: "alongside? why not instead?"
  3. Question: Add a permanent test for the announced label?
    Answer: Yes, one mounted test (Recommended)
    Confidence: 0.80 · Precedent: Catch errors in PRs as early as possible.

The row-level reveal control in the manual environment-variables editor
announced the "Secret" noun, while the edit form and the backend headers
field announce the action with profiles.secrets.reveal. Use the same copy
so a screen reader matches every reveal control the same way.

The noun key has no other source use, so it leaves every catalog; the
catalog check rejects an English key no source file references.
@iscekic iscekic added drain Work item from the findings drain janitor:i18n Janitor finding: mobile copy and catalog checks labels Oct 21, 2026
The to-do list settings sheet now subscribes to the Android back press, so
its picker test's react-native mock needs the export to mount the sheet.
An empty arrow function in the mock trips the lint rule against empty
functions; a spy keeps the subscription shape and passes lint.
@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change since the last review is a one-line test-only BackHandler export in the to-do picker mock plus a merge of main; the reveal-label change and profiles.secretLabel removal are unchanged and still complete.

Assumptions: [INFERENCE] Tests, lint and check:i18n were not executed in this read-only session; verification is from the diff plus repository reads. I re-confirmed profiles.secretLabel has no remaining reference in source or catalogs, that en.json and each translated catalog still lose exactly that one key, and that profile-variables-rows.tsx now labels the control with profiles.secrets.reveal. The new mock matches the existing BackHandler mock shape in session-preview-overlay.test-helpers.tsx. Changes brought in by the main merge are already on the base branch and are not part of the PR diff against a31f09cb.

Files Reviewed (92 files)
  • apps/mobile/src/components/profiles/profile-variables-rows.tsx
  • apps/mobile/src/components/agents/advanced-config-panel.mounted.test.tsx
  • apps/mobile/src/components/todos/todo-list-model-picker.mounted.test.tsx
  • apps/mobile/src/i18n/locales/*.json (87 catalogs, one profiles.secretLabel deletion each)
Previous Review Summary (commit c3ecf2b)

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

Previous review (commit c3ecf2b)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The reveal control's label change is consistent with the existing reveal toggles in the edit form and backend headers field, and the profiles.secretLabel removal is complete and internally consistent across all 87 catalogs; the test additions and the unrelated test-only BackHandler mock fix are low risk.

Assumptions: [INFERENCE] Tests and check:i18n were not executed in this read-only session; verification is from the diff plus repository reads. I confirmed no remaining secretLabel reference anywhere in the repo and that every locale file contains profiles.secrets.reveal. The BackHandler mock addition addresses an unrelated main CI failure but is test-only and matches the shape already used in other mounted-test helpers.

Files Reviewed (92 files)
  • apps/mobile/src/components/profiles/profile-variables-rows.tsx
  • apps/mobile/src/components/agents/advanced-config-panel.mounted.test.tsx
  • apps/mobile/src/components/todos/todo-list-model-picker.mounted.test.tsx
  • apps/mobile/src/i18n/locales/*.json (87 catalogs, one profiles.secretLabel deletion each)

Reviewed by deepseek-flash-latest · Input: 45.1K · Output: 4.2K · Cached: 481.8K

Review guidance: REVIEW.md from base branch main

main already repaired the to-do picker's react-native mock, so the merge
takes main's stub.
@iscekic iscekic added the merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. label Oct 21, 2026
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 janitor:i18n Janitor finding: mobile copy and catalog checks 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