Skip to content

fix: restore main CI and startup a11y flags after button guidance - #73

Merged
Twcat0503 merged 6 commits into
mainfrom
fix/main-ci
Nov 19, 2026
Merged

Twcat0503 merged 6 commits into
mainfrom
fix/main-ci

Conversation

@Twcat0503

@Twcat0503 Twcat0503 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

改了什麼、為什麼

CI on main has failed since 254656c (run 42432392291). c73afd5 (button guidance) and 370efaf were pushed to main without the self-checks. CI stops at the format steps: Prettier flags 4 files in frontend/agent-mvp and dart format flags 1 file. With formatting fixed, the steps CI never reached also fail: 1 unit test and 7 e2e tests in frontend/agent-mvp, plus 1 more e2e test that fails only with CI's fonts. One of them is a real accessibility regression.

Failure Cause Fix
Prettier (4 files), dart format (1 file) c73afd5 was pushed without running the formatters Formatter output only (606ce62)
Tracked android/.kotlin/sessions/*.salive 370efaf committed a Kotlin daemon session file Remove it and ignore android/.kotlin/ (7c33236)
e2e app.e2e.ts:929 Regression. introduceHome() loads a11y_state at startup while initAccessibility() is still loading it. The overtaken startup load returned a stale copy and mirrored it onto <html>, so bold text, high contrast and reduced motion were lost at startup An overtaken load now settles with the newest load's result, plus a regression unit test (a4bba66)
unit guidance-preference.test.ts (native opt-out) initialGuidance() read the saved browser preference even when the native preference is configured and wins anyway Read localStorage only when the native side reports configured: false; the returned values are unchanged (34228b6)
e2e button-guidance ×3 The home introduction spoken on load, which has its own tests, was counted in the exact spoken-text checks Leave it out of those checks (86d7406)
e2e native-voice ×2 c73afd5 removed the voice dock's finish and type-instead buttons and made recognition submit automatically; the tests still used the old flow The fixture simulates the recognizer ending by itself and checks the auto-submit; the unavailable case leaves through the cancel button (86d7406)
e2e townpass.e2e.ts:74 (flaky) At 393×915 the home screen fits only two suggestions in phone mode, so the benefits suggestion is cut off and the test passed only when its click beat the re-measure Use a 393×1000 viewport (86d7406)
e2e app.e2e.ts:165 (CI only) At 200% text in English, DejaVu Sans on CI makes the fixed chat header and composer dock, which gained a "More suggestions" chip in c73afd5, cover the "Open template" link wherever it scrolls. The narrower macOS fonts leave room The 200% checks in this test only cover reflow, so reset the text size before the navigation part (f781171)

The tests now follow the current c73afd5 behaviour (auto-submit, no finish button). Apart from the two fix(a11y) commits, no product behaviour changes. Follow-ups in separate PRs: align the voice docs and hint with auto-submit, list usable home suggestions first, and keep conversation content reachable at 200% text when the fixed header and composer dock grow.

如何驗證

Local run on 86d7406 (macOS), same commands as CI:

  • Flutter: fvm dart format --output=none --set-exit-if-changed lib test (0 changed), fvm flutter analyze (no issues), fvm flutter test (219 passed)
  • frontend/agent-mvp: pnpm lint, pnpm format:check and pnpm build pass; pnpm test 585 passed; pnpm test:e2e 73 passed
  • tools/townpass: pnpm typecheck passes; pnpm test 114 passed
  • frontend: pnpm lint (0 errors; 35 existing warnings, none in changed files), pnpm format:check and pnpm build pass; pnpm test 17 passed
  • The new test in tests/accessibility.test.ts fails against the previous a11y.ts
  • The debug APK build was not re-run locally; it passed in CI on 86d7406

After f781171 (test-only), in frontend/agent-mvp: pnpm lint, pnpm format:check and pnpm build pass; pnpm test 585 passed; pnpm test:e2e 73 passed. With Verdana forced (metrics close to DejaVu Sans), app.e2e.ts:165 times out on the same click without the fix and passes 6 of 6 runs with it.

Checklist

  • 一個 PR 只做一件事,沒有夾帶無關變更
  • 已執行所屬棧的自檢指令並將結果貼於上方(Flutter:fvm flutter analyze/fvm flutter test;前端:pnpm lint/pnpm test)
  • Flutter 變更已於 Android 裝置/模擬器驗證 (the only Dart change is formatting of a test file)
  • 設計自檢通過(WCAG 2.1 AA、TalkBack、字級 200%、觸控目標 48dp、語言標示;見 CONTRIBUTING.md「設計規範」) (no layout or copy change; the a11y fix restores existing settings; the e2e axe WCAG 2.1 AA scans pass; not checked with TalkBack)
  • diff 中沒有 API key、token 等機密,也沒有個人環境檔或內部文件(見 CONTRIBUTING.md「個人開發環境與內部文件」)
  • 新增的相依套件為開源且與 AGPL-3.0 相容,並已於內文說明理由 (no new dependencies)

相關 issue(若有)

None.

370efaf committed a Kotlin Gradle Plugin daemon session file under
android/.kotlin/. Remove it and ignore the directory.
Prettier and dart format output only, no behavior change. These files
made the agent-mvp lint step and the Flutter format check fail.
introduceHome() loads the accessibility state at startup while
initAccessibility() is still loading it. The overtaken startup load
returned a stale copy and mirrored it onto <html>, and the newer state
was never applied, so the bold text, contrast and motion flags were lost
at startup. An overtaken load now settles with the newest load's result.
initialGuidance() read the saved browser preference even when the
native preference was configured and wins anyway. Read it only when the
native side reports configured: false; the returned values are unchanged.
- Button guidance: leave the home introduction, which plays on load and
  has its own tests, out of the exact spoken-text checks.
- Native voice: the dock no longer has finish or type-instead buttons and
  recognition submits automatically, so simulate the recognizer ending
  by itself and leave through the cancel button.
- Benefits suggestion: at 393x915 the home fits only two suggestions in
  phone mode, so the test passed only when its click beat the re-measure.
  Use a 393x1000 viewport.
Copilot AI balanced review requested due to automatic review settings November 18, 2026 23:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

On CI the bill flow test timed out clicking "Open template: Water
bills". At 200% text in English, DejaVu Sans makes the fixed chat
header and composer dock, which gained a "More suggestions" chip in
c73afd5, tall enough to cover the link wherever it scrolls. The
narrower macOS fonts leave room, so the test passed locally.

The 200% checks in this test only cover reflow, so reset the text size
before the navigation part. Reproduced and verified locally by forcing
Verdana, whose metrics are close to DejaVu Sans.
@Twcat0503
Twcat0503 merged commit 4f533b4 into main Nov 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants