Skip to content

fix(mobile): give the start agent no-repository message provider-neutral copy - #8463

Merged
iscekic merged 7 commits into
mainfrom
drain/start-agent-neutral-repository-copy
Oct 22, 2026
Merged

iscekic merged 7 commits into
mainfrom
drain/start-agent-neutral-repository-copy

Conversation

@iscekic

@iscekic iscekic commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

The StartAgent action path reports no-repository when the request names no repository and the recent-session lookup finds none. At that point no git provider is known, so the message it reports must not assume one.

  • apps/mobile/src/lib/app-actions/start-agent.ts: noRepositoryFailure() now renders appActions.start.repositoryRequired.
  • apps/mobile/src/i18n/locales/*.json: the new key ships in English and in all 86 translated catalogs, next to promptRequired, in the voice of the existing appActions.start strings.
  • apps/mobile/src/lib/app-actions/start-agent.test.ts: the no-repository case asserts the reported message resolves to the new key and names no provider.

The branch carries only these files against main. Earlier merge commits in its history briefly repaired pnpm-lock.yaml and two packages/web-shared test files; main has since landed the same repairs, and the merge with main takes its version of both, so neither is part of this change.

The string is intent-neutral, because the repository resolves before sessionId is read and the same failure also reaches an intent that continues an existing session:

Start agent needs a repository. Open Kilo and choose one, then run it again.

The GitHub / GitLab / Bitbucket picker empty states keep their existing provider-specific keys; only the action path, which resolves no provider, changes.

Verification

Checker and suite runs on this VM (all green):

node tools/i18n/check-catalogs.mjs                                # 87 languages, every catalog matches en.json
node tools/i18n/check-plurals.mjs --source-only                   # plural families complete
pnpm exec oxfmt --list-different .                                 # clean
pnpm --filter kilo-app check:i18n                                  # oxlint i18n rules + catalog parity, 0 errors
pnpm --filter kilo-app exec vitest run src/lib/app-actions         # start-agent suite, 17 tests passed
pnpm --filter kilo-app exec vitest run src/lib/app-actions src/i18n   # 24 files, 1722 tests passed
pnpm --filter kilo-app test                                        # 1206 files, 18060 tests passed
pnpm --filter kilo-app exec tsc --noEmit                           # clean

The new assertion fails against the previous call site (single-test run: 1 failed, 16 passed) and passes with the change.

A full pnpm install --frozen-lockfile on this head completes, and git diff origin/main lists only the mobile catalog and app-action files.

End-to-end on the Android emulator

Local dev stack (dev:start core mobile), CI dev-client APK, a fake account signed in through the email-code flow with no sessions, so the recents lookup resolves nothing. The action URL was fired at the running app:

adb shell am start -a android.intent.action.VIEW \
  -d 'kiloapp:///actions/start-agent?prompt=fix%20the%20failing%20build'

The Metro log shows start-agent.ts and start-agent-runtime.ts bundling on each run. The app reports the failure through the app-root toast; screencaps were read back with OCR because the toast is not exposed in uiautomator output.

  • Before the change: toast read No repositories visible. Check repository access for the Kilo GitHub App, then refresh.
  • After the change: toast reads Start agent needs a repository. Open Kilo and choose one, then run it again.

Screenshots are in the comments below. The last pushes only merged main; the rendered string is unchanged, so the earlier captures still show the current copy.

Proxy answers

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

  1. Question: English copy: Which English wording for the new provider-neutral StartAgent no-repository message? (Siblings: "Start agent needs a prompt. Add a prompt and run it again.")
    Answer: Start agent needs a repository. Open Kilo and choose one in a new session, then run it again.
    Confidence: 0.65 · Precedent: UX and design quality: keep similar elements consistent across surfaces; this option matches the sibling promptRequired voice and names the fix action.
  2. Question: Key placement: Where should the neutral string live?
    Answer: New key appActions.start.repositoryRequired inside the existing appActions.start block
    Confidence: 0.70 · Precedent: UX and design quality: keep similar elements consistent across surfaces; the string belongs with the action path's own messages.
  3. Question: Scope: Should this change touch anything besides the action path's no-repository message?
    Answer: Only the action path; keep noRepositoriesVisible / Gitlab / Bitbucket picker copy as is
    Confidence: 0.60 · Precedent: Git and pull requests: put each separate concern in its own PR; the brief keeps noRepositoriesVisible for the GitHub picker.
  4. Question: E2E depth: How far should end-to-end verification go for a message that surfaces through an OS action path?
    Answer: Android emulator: fire kiloapp:///actions/start-agent from a signed-in fake account with no recent repository and capture the toast on the new copy
    Confidence: 0.85 · Precedent: Proof and verification: require valid end-to-end proof on every PR; use Android on the work VM by default.
  5. Question: Copy follow-up: Kilobot showed the no-repository failure can also reach a StartAgent call that continues an existing session (session id, no repository), where "choose one in a new session" is wrong guidance. How should the wording change?
    Answer: Drop the "in a new session" clause: "Start agent needs a repository. Open Kilo and choose one, then run it again."
    Confidence: 0.77 · Precedent: Speed and least work: do the least amount of work, with no drop in quality. One neutral string is correct for both intents, so a second key and 86 more translations add no value.
  6. Question: Lockfile: merging main brought a lockfile whose snapshots name versions with no resolution entry; a frozen install fails on a clean worktree, and every CI job of the merge commit fails at its install step. This is pre-existing on main, not caused by this change. How should this PR proceed?
    Answer: Repair the lockfile in this PR
    Confidence: 0.65 · Precedent: Autonomy: never accept blocked as an end state and fix errors even when unrelated; a work item must converge. Regenerate the lockfile with pnpm instead of editing it by hand, put it in its own commit, and note it in the pull request description. Main landed the same repair in the meantime, so its version now stands.
  7. Question: Lint: the lockfile commit makes CI lint every workspace, and the full lint reports three type-aware stringification findings on main in two packages/web-shared ai-gateway tests. How should this PR proceed?
    Answer: Fix the three findings in this PR
    Confidence: 0.75 · Precedent: Autonomy: fix a gap or an error even when it is unrelated, and a work item must converge. Main has since narrowed the same two files, so its version now stands.

…ral copy

The StartAgent action path reports no-repository when neither the request nor
the recent-session lookup names a repository, so no provider is known there.
Render a dedicated provider-neutral message instead of the GitHub picker's
copy.

- add appActions.start.repositoryRequired in English and the 86 translated
  catalogs
- render it from noRepositoryFailure
- assert the reported message resolves to that key and names no provider
@iscekic iscekic added drain Work item from the findings drain janitor:i18n Janitor finding: mobile copy and catalog checks labels Oct 21, 2026
@iscekic

iscekic commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Android emulator proof for the StartAgent no-repository message, captured on the local dev stack with a signed-in test account that has no sessions, after firing kiloapp:///actions/start-agent?prompt=… at the running app. The action reports through the app-root toast, which uiautomator does not expose, so the captures were read back with OCR.

  • Before: the toast read No repositories visible. Check repository access for the Kilo GitHub App, then refresh.
  • After: the toast reads Start agent needs a repository. Open Kilo and choose one in a new session, then run it again.

Both screenshots are the same Home screen and toast position; only the message text differs.

App home screen toast before the change

App home screen toast after the change

oxfmt keeps the three-argument call on one line.
@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 only changes since the previous review are two packages/web-shared test files that read captured fetch arguments by their narrowed types; the changes preserve every assertion and introduce no correctness, security, or type-safety defect, and the previously fixed mobile copy remains in place.

Assumptions: [INFERENCE] I did not re-run the suites (read-only mode); I verified the narrowing paths by reading the call sites (refresh.ts sends a string body, the Bedrock helper types input as RequestInfo | URL and asserts one call before destructuring) and confirmed packages/web-shared/tsconfig.json does not enable noUncheckedIndexedAccess. Per-language translation quality for the mobile key was previously verified and those files are unchanged.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Files Reviewed (2 incremental files, plus targeted re-checks)
  • packages/web-shared/src/lib/ai-gateway/openai-chatgpt/refresh-terminal-race.test.ts - 0 issues (narrowed request.body to string before asserting; matches the string body built in refresh.ts:149)
  • packages/web-shared/src/lib/ai-gateway/providers/upstream-request.aws-bedrock.test.ts - 0 issues (url now derived from string/URL/Request variants instead of String(...), and body narrowed to string; same assertions)
  • Targeted re-checks: apps/mobile/src/lib/app-actions/start-agent.ts:227, apps/mobile/src/lib/app-actions/start-agent.test.ts:287-306, apps/mobile/src/i18n/locales/en.json:3630 - previous finding remains fixed, no open findings
Previous Review Summaries (4 snapshots, latest commit 96d2742)

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

Previous review (commit 96d2742)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commits since 3521f47 are a merge of main and a lockfile repair; they leave the previously reviewed provider-neutral copy intact and introduce no new code defects or security issues.

Assumptions: [INFERENCE] I did not re-review the ~899 files that arrived with the origin/main merge (they are main's already-reviewed changes); I verified only that the merge preserved this PR's own change and that the lockfile commit is internally consistent. Per-language translation quality for the new key was not re-checked beyond confirming the English copy drops the "in a new session" clause, contains no provider name, and that the key exists exactly once in each of the 87 catalogs.

Overview

  • apps/mobile/src/lib/app-actions/start-agent.ts:227 still renders appActions.start.repositoryRequired; the empty-state message remains provider-neutral, so the earlier sessionId continue-intent guidance mismatch stays resolved.
  • apps/mobile/src/lib/app-actions/start-agent.test.ts:287-306 keeps the assertion that the message names no provider and now narrows the result type before reading message.
  • All 87 apps/mobile/src/i18n/locales/*.json catalogs still carry appActions.start.repositoryRequired exactly once, with no "new session" or GitHub/GitLab/Bitbucket wording in any value.
  • pnpm-lock.yaml adds the missing @emnapi/core@1.10.0, @emnapi/runtime@1.10.0 and @napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) entries and records jest-worker@30.5.1 against @ungap/structured-clone@1.4.0; every referenced entry now resolves, and @ungap/structured-clone@1.3.0 has no remaining references. It is a generated lockfile (excluded from findings) and is internally consistent.
Files Reviewed (90 files)
  • apps/mobile/src/lib/app-actions/start-agent.ts
  • apps/mobile/src/lib/app-actions/start-agent.test.ts
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)
  • pnpm-lock.yaml (generated, skipped per review rules)

Previous review (commit 3521f47)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commit only rewrites the appActions.start.repositoryRequired string in all 87 catalogs to drop the "in a new session" clause, which resolves the previously reported guidance mismatch for sessionId continue intents; no provider names were introduced and the key still appears exactly once per catalog.

Assumptions: [INFERENCE] Translation quality beyond confirming the "new session" clause was removed from every changed value, that no changed value names GitHub/GitLab/Bitbucket, and that each catalog still holds the key exactly once was not verified per language. apps/mobile/AGENTS.md says to edit copy only in en.json, but updating every catalog in the same mobile-copy commit is the established pattern for this PR series (as noted in the prior review), so it is not raised as a finding.

Files Reviewed (87 files)
  • apps/mobile/src/i18n/locales/*.json (87 catalogs) - no new issues; each changed repositoryRequired value drops the new-session guidance, stays provider-neutral, and the previously reported suggestion on start-agent.ts:227 is resolved

Previous review (commit 57488c8)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The provider-neutral copy is wired and translated correctly, but its "choose one in a new session" guidance also renders for StartAgent continue intents, where the user asked to resume an existing session.

Assumptions: [INFERENCE] Translation semantics beyond key parity, non-empty values, and absence of provider names were not verified per language; I confirmed each of the 87 catalogs holds the new key exactly once with a translated value. apps/mobile/AGENTS.md says to edit copy only in en.json, but adding new keys to every catalog in the same mobile-copy commit is the established pattern for this slice (e.g. d887c5394, c6a1e889b), so it is not raised as a finding.

Overview

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

SUGGESTION

File Line Issue
apps/mobile/src/lib/app-actions/start-agent.ts 227 The new copy is also used for sessionId continue intents, where "in a new session" is the wrong next step
Files Reviewed (89 files)
  • apps/mobile/src/lib/app-actions/start-agent.ts - 1 issue
  • apps/mobile/src/lib/app-actions/start-agent.test.ts - no issues
  • apps/mobile/src/i18n/locales/*.json (87 catalogs) - no issues; key present exactly once per catalog, none empty, none names GitHub/GitLab/Bitbucket

Fix these issues in Kilo Cloud

Previous review

Status: No Issues Found | Recommendation: Merge

Executive Summary

The no-repository action-path failure now renders a provider-neutral key, the key exists exactly once in all 87 catalogs with non-English values, and no remaining caller or test asserts the old GitHub-specific copy.

Assumptions: [INFERENCE] Translation semantics beyond parity, script, and placeholder automation were not verified per language; I confirmed each catalog has the key once, none names a provider, and only en.json holds the English value. apps/mobile/AGENTS.md says not to hand-edit translated catalogs, but adding new keys to every catalog in one commit is the established pattern in this repo (e.g. d887c53) and is required for catalog parity, so it is not raised as a finding.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Files Reviewed (89 files)
  • apps/mobile/src/lib/app-actions/start-agent.ts - noRepositoryFailure() returns appActions.start.repositoryRequired; the runtime's mostRecentRepository() can only yield null when no usable recent row exists, so no provider is known on this path
  • apps/mobile/src/lib/app-actions/start-agent.test.ts - asserts the failure message equals the new key and contains no provider name; the manual result.ok narrowing is sound
  • apps/mobile/src/i18n/locales/*.json - the new key is present exactly once in all 87 catalogs, ordered inside the appActions.start block, and the picker's noRepositoriesVisible keys are still used by new-session-repository-section.tsx
  • Verified no other call sites, specs, or docs reference the old action-path copy for no-repository

Fix these issues in Kilo Cloud


Reviewed by deepseek-flash-latest · Input: 37.4K · Output: 5.2K · Cached: 318.8K

Review guidance: REVIEW.md from base branch main

The StartAgent no-repository failure also reaches intents that continue an
existing session, where choosing a repository "in a new session" is the wrong
next step. Reworded in English and the 86 translated catalogs.
@iscekic

iscekic commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Recaptured after the reword (3521f47). Same setup: Android emulator, local dev stack, signed-in test account with no sessions, kiloapp:///actions/start-agent?prompt=… fired at the running app, toast read back with OCR.

The toast now reads Start agent needs a repository. Open Kilo and choose one, then run it again.

The earlier before/after pair in the previous comment still shows the failed-state difference; this capture is the reworded string on the same surface.

App home screen toast with the reworded message

@iscekic iscekic added the merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. label Oct 21, 2026
…tral-repository-copy

# Conflicts:
#	apps/mobile/src/i18n/locales/hu.json
A frozen install fails because jest-worker@30.5.1 names a structured-clone version that has no resolution entry, and the wasm runtime snapshots name emnapi versions that have no resolution entries either. Record both sets so the lockfile matches the dependency set that is already declared. No declared range changes.
Two ai-gateway tests stringify a fetch request body or URL union. Narrow each field to a string before asserting, which keeps the same assertions and drops the coercion.
…tral-repository-copy

# Conflicts:
#	packages/web-shared/src/lib/ai-gateway/openai-chatgpt/refresh-terminal-race.test.ts
#	packages/web-shared/src/lib/ai-gateway/providers/upstream-request.aws-bedrock.test.ts
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