Skip to content

Walk the app on an emulator, fix what it found, and the owner's tab bar and pickers - #186

Merged
lumenpearson merged 14 commits into
mainfrom
agents/uncovered-device-scenarios-c8618d
Sep 26, 2026
Merged

lumenpearson merged 14 commits into
mainfrom
agents/uncovered-device-scenarios-c8618d

Conversation

@lumenpearson

Copy link
Copy Markdown
Owner

Description

This is the first batch made on a machine with an emulator (#109). On 26 September 2026 the app was walked by hand on an API 37 emulator, against a local server and production, with the live bot beside it. The walkthrough found twelve defects and filed each before fixing it (#167–#178); nine are fixed here. Over the evening and the night the owner added six requests about the tab bar and the pickers (#179–#184), and a screenshot of Studio's sync warnings (#185). All of those are here too.

# What was wrong What it does now
#167 The widget picker's preview was «Couldn't add widget.»: a plain <View> in widget_preview.xml FrameLayout; RemoteViewsLayoutTest refuses any tag RemoteViews will not inflate
#168 Two redraws inside one Glance session drew the first snapshot WidgetRedraws counts redraws; a live composition re-reads when the count moves
#169 A sync of another school year took the current year's terms away, and a 304 never put them back replaceWindow keeps other years' terms and takes the window's own
#170 The server did not start on Windows: there was no time-zone database tzdata is declared for win32 only
#172 «Схема unknown» on the about card the server's sentinel is read as no revision
#173 «0 предметов» on the one-line widget sizes «Ничего не задано»
#177 OkHttp's English inside «Не удалось подключиться: …» and «Не удалось обновить: …» the app's own sentences
#178 Three tests failed on a Windows checkout paths and line endings normalised
#179 A tab's press and focus highlight was a square a circle, drawn inside the tab's shape; the whole box still takes the press
#180 A dropped tab flashed the old order for a frame tabs keyed and animated by where they are; the selection read from the tab being kept on
#181 Picking a tab up took a second touch after the long press one touch: the long press opens the mode and carries the tab
#182 A tap outside the bar did not close the arranging mode, and it reached the page ArrangingDismissLayer between the page and the bar
#183 A scrolled section was cut by a straight edge 8 dp inside the pill the pill's own round end cuts it
#184 A picker's segments sat 2 dp apart in a tray 4 dp from them the gap is the tray's inset
#185 Gradle sync warned six times that srcDirs is deprecated in AGP 9.4 directories +=, with the same folders

Also in this batch:

  • The in-app guide says how to arrange the tabs (manifest version 6).
  • .run/ shares the Android gates as Android Studio run configurations.
  • docs/build.md says how to open the repository in Studio and how an emulator reaches a local server.

Checking #181 on the emulator found two defects this branch had introduced on its way, and both are fixed here. The folding label bounced a neighbouring tab out of the pill mid-drag. Keying the tabs took the gap after each tab along with it, so a drop could land 8 dp short.

Closes #119
Closes #156
Closes #167
Closes #168
Closes #169
Closes #170
Closes #172
Closes #173
Closes #177
Closes #178
Closes #179
Closes #180
Closes #181
Closes #182
Closes #183
Closes #184
Closes #185
Closes #114
Closes #115
Closes #116
Closes #117

What is affected

  • server/app/api — the client-facing API
  • server/app/bot — the bot
  • server/app/services — the rules the bot and the API share
  • server/app/providers/petersburg — the electronic diary
  • server/migrations — the database schema
  • android/core/model — the models and the state engine
  • android/core/data — Room, network, sync, notifications
  • android/core/designsystem — theme and components
  • android/widget — the widget
  • android/app — the screens
  • docs/, README.md
  • .github/ — build and automation

Also touched: server/pyproject.toml and two server tests (#170, #178). There is no server code change.

Boundaries

  • app/schedule.py still imports neither FastAPI nor aiogram (untouched)
  • The rule did not appear in two places (no server rule changed)
  • A model change comes with an Alembic revision: there is no model change, and EXPECTED_REVISION is still 0017
  • Nothing is scheduled "in process" on the server
  • "Now" is taken in the class's time zone (untouched)
  • :core:data does not depend on :widget: the widget's redraw goes through its own WidgetRedraws
  • Every new Russian string has its English twin: one string was removed from both languages, and the guide's new paragraph is in both
  • There is no token, class code, password or keystore path in the diff

Verification

Run on this Windows machine at the head of the branch:

cd server && ruff check app tests scripts migrations → All checks passed!
cd server && python -m mypy                          → Success: no issues found in 100 source files
cd server && pytest -q -n auto                       → 2024 passed in 596.30s
cd android && ./gradlew test                         → 1438 passed (:core:model 125, :core:data 537, :core:designsystem 112, :widget 113, :app 551)

Every fix has a test, and each test was checked to fail on the code before it.

What is NOT covered

  • A toolbar tab's press and focus highlight is a square, not a circle #179–Segments in a tray sit 2 dp apart while the tray's edge is 4 dp from them #184 are covered by JVM tests. The owner was using the emulator at the same time, so the device check stopped part-way. The system once cancelled an injected touch because another device was touching the screen, and the tab order changed with no command from this session. Only two of the fixes were seen on the emulator: the one-touch pickup and the pill's round end. The drop without its flash, a tap outside closing the mode, and the picker's gaps were not.
  • Not answerable on an emulator: a thumb, haptics, a real GPU's frame times, TalkBack, Doze, and a real diary account.
  • No password was typed anywhere, and nothing was signed with the release key: it came without its passwords.
  • HANDOVER.md has the detail, and section 5 there says what is still unseen.

Documentation

  • docs/ updated: build.md, widget.md, architecture.md, design.md, and the in-app guide
  • CLAUDE.md updated (no commands, modules or boundaries changed)
  • README.md updated: the honest status and the test count
  • No update needed

The launcher's picker showed «Couldn't add widget.» on every launcher
from API 31, because the preview layout's root was a plain <View>, and
RemoteViews inflates only the classes marked @remoteview. It is a
FrameLayout now, and RemoteViewsLayoutTest reads every layout the widget
ships and refuses a tag RemoteViews will not inflate, so the next one is
a failing test rather than a broken picker nobody opens.

Seen on an API 37 emulator before and after.

Closes #167
provideGlance read the snapshot once, before provideContent, and a
Glance session stays alive for about 46 seconds after it. updateAll
inside that window only recomposes the running composition, which
still held the first snapshot: a second class switch made within the
window left the widget drawing the class just left.

WidgetRedraws counts the redraws asked for; the tick receiver bumps it
before updateAll, and the live composition re-reads the snapshot
whenever the count has moved past the one its first read was taken at.
A redraw asked for between the read and the collection is not lost,
and a newer one replaces a read still in progress.

docs/widget.md says so, describes the picker's preview (#167), and
names WidgetTickReceiver as the receiver of DATA_SYNCED, which it had
wrong.

Closes #168
The class row carries its terms, and replaceWindow wrote the fetched
row whole. The server answers with the terms of the year that was asked
for, so a look at another school year took the current year's terms
away, and a 304 on the next sync of the current year never put them
back: the calendar lost its quarters until the cache was cleared.

replaceWindow keeps every stored term that lies wholly outside the
window it replaces and takes the window's own from the answer, and the
terms decode in date order. TermsAcrossYearsTest fails without the DAO
change.

Closes #169
/api/v1/warmup answers "schema": "unknown" when it cannot read
alembic_version, and the about card drew it as a revision:
«Схема unknown». WarmupDto.revision treats a blank or «unknown» value
as none, and both the healthy and the degraded answer read it, so no
chip is drawn for a revision nobody knows.

Closes #172
The homework line on the smallest sizes counted subjects through a
plural, and zero is a number the plural words as «0 предметов». The
count is worded in one place now, which says «Ничего не задано» for
none, and the today row uses it too.

Closes #173
The join screen and the refresh snackbar put OkHttp's exception text
inside «Не удалось подключиться: …» and «Не удалось обновить: …», so a
Russian sentence ended in English from the network stack. An offline
join is the screen's own refusal now, unless the server address is
missing, which keeps its own message; a failed sync carries no detail
and says the generic sentence. sync_error_failed, which only existed to
carry the detail, is gone from both languages.

JoinErrorTest asserted the defect as correct behaviour («anything else
is still shown verbatim»); it now asserts the opposite, and keeps the
one case that is meant to be verbatim, a server's own answer.

Closes #177
UnusedStringTest looked for "/src/" in a path Windows spells with
backslashes, LegalBuildPropertyTest matched a blank line without the
\r a Windows checkout gives it, and test_directory compared a relative
path in the platform's separators with one written with «/». Each
normalises now. CI runs on Linux and never saw any of it.

The server suite on Windows also meets «database is locked» under
-n auto now and then, from SQLite under load; that is noted on the
issue and left alone.

Closes #178
zoneinfo reads the system's database, and Windows has none: the server
did not start at all there (ZoneInfoNotFoundError on the first class's
zone). tzdata is declared for win32 only, and the mirror test lists it
among the packages the Vercel bundle deliberately goes without, since
Linux has the database already.

Closes #170
BackupRulesTest proves the rule files; what it could not say is whether
a real backup leaves the reports out. On 26 September 2026 a crash
report and two probe files went through bmgr's local transport, plain
and flagged as a device transfer: the probes came back, the report did
not. The test's note says so, and what it still cannot ask — Google's
own transport to a real account.

Closes #156
The owner's requests about the bar, one file between them, so one
commit:

- A tab's press and focus highlight is a circle (#179). The clickable
  keeps the whole box for the press and draws no indication; the ripple
  is drawn inside the Surface, whose CircleShape clips it.
- A dropped tab no longer flashes the old order for a frame (#180). The
  tabs are keyed by label and animate where they are rather than their
  offset from a slot, and the shell reads the selected tab from the one
  it is keeping the pager on rather than from the pager's index, which
  names the old order until the pager has moved.
- The long press that opens the arranging mode also picks the tab up
  (#181): one detector on the initial pass, ahead of the clickable,
  which consumes the pointer once it holds a tab so the lift is never a
  tap. Inside the mode a sideways move picks a tab up; the long press
  stays a TalkBack action.
- A touch anywhere but the bar closes the mode, and reaches nothing
  under it (#182): ArrangingDismissLayer, between the page and the bar.
- A section scrolled out of the guide's bar goes under the pill's round
  end (#183). Material pads the pill by 8 dp and scrolls its content
  inside that padding, so everything was cut by a straight edge 8 dp
  in. The side padding is inside the rows now, and the pill's own clip
  is what cuts.

Checking #181 on the emulator found two things this branch had broken
on its way, fixed here: the label that folds as the mode opens bounced
below nothing and carried a neighbour out of the pill mid-drag (it
folds on a spring without a bounce now), and keying the tabs took the
gap after each one with it, so a drop could land 8 dp short (the gap
belongs to the slot, as ToolbarGap).

Every change has a Robolectric test that fails on the code before it.
ToolbarShellCallerTest puts the bar under a caller shaped like the
shell's and asks for one commit and a row that stays where it was
dropped. The in-app guide says how to arrange the tabs, and its
manifest is version 6.

Closes #179
Closes #180
Closes #181
Closes #182
Closes #183
In a tray the segments sat 2 dp apart, Material's connected gap, while
the tray's edge was 4 dp from them: crowded together inside a wider
frame, in «Неделя / Месяц / День» and every other picker drawn in a
tray. The gap is the tray's inset now, the one number its corners were
already derived from; a picker with no tray keeps the connected gap.
SegmentedPickerGapTest reads it as geometry and fails on the old gap.

Closes #184
Every Gradle sync warned six times that srcDirs(vararg) is deprecated
in favour of AndroidSourceDirectorySet.directories: once for the legal
documents in :app, and five times in :core:data for Room's schemas, the
guide, the region catalog and the sign-in vectors. A deprecated DSL
call goes in a later major, and on that day the APK would stop carrying
a folder without saying so.

Each folder is added to directories with the same path; like srcDirs,
it adds to the defaults rather than replacing them. LegalBuildPropertyTest
matches the new line. The keystore notice in the same sync output is
the build's own and stays.

Closes #185
…run the app on an emulator

.run/ holds five Gradle configurations that point at android/: the unit
tests CI runs, both assembles, an install of the debug build, the pure
model's tests and lint (labelled as not a gate). docs/build.md says how
to open the repository in Android Studio, how an emulator reaches a
local server (adb reverse and 127.0.0.1, because 10.0.2.2 did not answer
here), and that a server on Windows needs tzdata (#170).
HANDOVER.md opens on #186 and gains the batch: what was seen on the
emulator by issue, the defects filed before their fixes, the owner's
requests about the bar, the pickers and the sync warnings, what the recording could
not settle because the emulator was shared, the machine's own costs,
and the gates. Sections 5 and 7 say what the batch answered and what is
the owner's now: the keystore's passwords, space on C: and a restart of
Studio.

README.md's honest status says what one walkthrough on an emulator
saw. docs/architecture.md keeps the class row's terms across years
(#169) and carries the new test counts, per module.
@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lessons Ready Ready Preview Sep 26, 2026 9:25pm UTC

@lumenpearson
lumenpearson marked this pull request as ready for review September 26, 2026 21:26
@lumenpearson
lumenpearson merged commit c26eace into main Sep 26, 2026
5 checks passed
lumenpearson pushed a commit that referenced this pull request Sep 26, 2026
…y left

HANDOVER.md opens on #187 and gains its batch: #110's device test and
the catalog pins it needed, #175, #176 and #171 with the hardening made
at review, the branch ref that came back as NUL bytes and was restored
from its reflog, and a teleport stash of IDE-generated files left for
the owner. It records the gates on f787357, the join seen on the
emulator — one 200 and one 304, never the overlap the fix coalesces —
and what that leaves unverified. #186's summary moves into its own
section, now «What the session before it added», and the chain below it
shifts by one. Sections 5 and 7 no longer say there is no androidTest
or that C: has 1.3 GB.

The Android test count is 1446 in its three places, and the README's
gate table carries the device run, marked as outside CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lumenpearson pushed a commit that referenced this pull request Sep 27, 2026
…they left

HANDOVER.md opens on #189 and gains its batch: #174's diagnosis
corrected (the phone's 2×2 is SMALL_TALL, not LARGE) before the fix,
the fix, #188 found while checking it and fixed, what the emulator
showed in both languages and at font scale 2.0, how the widget can and
cannot be redrawn from a shell, and the gates on 675cafe. #187's section
becomes «What the session before it added» and records its merge; the
chain below shifts by one, and two references to #186's section now
name it by its subject, since «What the batch before added» is shared.
Section 5 says what #189 did not see: the one-line size during lessons
at a large font, a system font-scale change, any other launcher. Section
7 has this batch's cost in disk.

The Android test count is 1459 in its three places.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lumenpearson
lumenpearson deleted the agents/uncovered-device-scenarios-c8618d branch September 27, 2026 10:08

This branch was successfully deployed

1 active deployment
Preview — 073dbe7a Deployed Sep 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment