Repository navigation
Keep the widget's smallest sizes readable, and redraw it when a setting it draws changes - #189
Merged
Merged
Conversation
…t sizes A 2×2 on a phone read «4 урока · Алгебра в 08:…» with two of three homework subjects over an empty lower half, and a 2×1 at the largest font read «Д… 3 предмета». The issue put the 2×2 on LARGE; it is SMALL_TALL. At about 195×226 dp, LARGE does not fit inside the box, and the cut was SMALL_TALL's 24-character budget applied to a 25-character line, from its end. The plan line now spends its budget on the subject. The count and the time are what it is for: «4 урока · Алгеб… в 08:30». On the narrow rungs it may take a second line rather than be clipped at 110 dp. SMALL_TALL lists three homework subjects after school; in 190 dp that is about 130 dp of content, 175 at the worst, and NARROW above it has three already. On the 2×1 the label is weighted and the count is not, so an enlarged font took the width from the label. From the first step above the default the count is drawn as the bare figure, «ДЗ на завтра 3», or «ДЗ на завтра нет» with a new string and its English twin. The rule is a step rather than a measurement, because Glance can measure neither text nor the box. DayPlanTest, TinyCountTest and a pinned 2×2 in WidgetSizeClassTest fail on the old code, five of them. On the emulator the 2×2 read «4 урока · Алгеб… в 08:30» over three subjects, and the 2×1 at font scale 2.0 read «ДЗ на завтра 3». Not checked: the one-line size during lessons at a large font («ПЕРЕМЕНА 7 мин»), and any phone but this emulator. Closes #174 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switched to Russian on the emulator, the app redrew at once and the 2×2 widget went on saying «DAY OFF» and «HW for tomorrow». A pull-to-refresh answered 304 and did not redraw it either, and only a reinstall did. The widget draws three settings: the language, «Прогресс в виджете» and the teacher switch. It is redrawn by DATA_SYNCED, which a sync sends only when the data changed, and by its own tick, which on a day off is hours away. A settings change was neither. SettingsRepositoryImpl.update now sends DATA_SYNCED when AppSettings.drawnByWidget moves, beside the alert re-arm it already did the same way. The widget reads its settings through that projection and nothing wider, so a setting it starts to draw cannot be drawn without also being the thing that asks for a redraw. The repository reads a SettingsStore now, which LessonsPreferences implements the way it implements DiarySessionStore and ShellModeSource, so WidgetSettingsRedrawTest can hand it a map: this module's JVM tests cannot open a DataStore. Its first case fails without the call. On the emulator, Russian before the switch to English and English three seconds after it, with no reinstall in between. Not covered: a change of the system font scale, which decides the rung and the one-line count, is a configuration change rather than a setting and was not watched to see whether anything redraws after it. Closes #188 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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
marked this pull request as ready for review
September 27, 2026 09:54
lumenpearson
pushed a commit
that referenced
this pull request
Oct 2, 2026
…nto the history The opening names #214 as merged at eb0ab94 and this pull request as the one thing open; a section on top describes the three bumps and #212's fix; the audit batch becomes the session before it, and the widget batch (#189) goes verbatim to the top of docs/history.md. The server test count moves to 2064 in README.md, docs/architecture.md, CLAUDE.md and this file's cheat-sheet, and the milestone tables name #218. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011RjGnZtszhBT53XZM7vabV
11 of 13 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two widget defects, both seen on the emulator and both fixed and seen again there.
SMALL_TALLlists three subjects after school. At any font above the default, the 2×1 draws the count as the bare figure: «ДЗ на завтра 3», or «ДЗ на завтра нет»304sync did not, and on a day off the next tick is hours awaySettingsRepositoryImpl.updatesendsDATA_SYNCEDwhenAppSettings.drawnByWidgetmoves, and the widget reads its settings through that projection only#174's diagnosis was corrected before the fix (in the issue's thread). The body said the 2×2 landed on
LARGE. At about 195×226 dp,LARGE(250×250) does not fit inside the box, so it lands onSMALL_TALL. The cut came fromSMALL_TALL's 24-character budget applied from the end of a 25-character line.WidgetSizeClassTestnow pins where a phone's 2×2 lands.#188 was found while checking #174 and filed before its fix. To test it without a DataStore, which this module's JVM tests cannot open,
SettingsRepositoryImplnow reads a smallSettingsStoreinterface.LessonsPreferencesimplements it the way it already implementsDiarySessionStoreandShellModeSource.HANDOVER.mdcarries the close-out.Closes #174
Closes #188
What is affected
server/app/api— the client-facing APIserver/app/bot— the botserver/app/services— the rules the bot and the API shareserver/app/providers/petersburg— the electronic diaryserver/migrations— the database schemaandroid/core/model— the models and the state engineandroid/core/data— Room, network, sync, notificationsandroid/core/designsystem— theme and componentsandroid/widget— the widgetandroid/app— the screensdocs/,README.md.github/— build and automationBoundaries
app/schedule.pystill imports neither FastAPI nor aiogram — the server is not toucheddrawnByWidget, both draws the widget's settings and decides its redrawEXPECTED_REVISIONis still0017:core:datadoes not depend on:widget— the redraw goes through the existing broadcastvalues-en/—widget_homework_none_shortVerification
The server was not touched, so ruff, mypy and pytest were not run.
Each new test was run against the old behaviour first:
At 2×2 the widget cuts the lesson's start time, and at 2×1 with the largest font the label shrinks to «Д…» #174. With the plan cut from the end, the count always worded and
SMALL_TALLat two rows, five tests fail:DayPlanTest×3,TinyCountTest×1 and the pinned 2×2 inWidgetSizeClassTest.The widget keeps the old language and the old widget settings until something else redraws it #188. Without the redraw call,
WidgetSettingsRedrawTest's first case fails../gradlew assembleDebug./gradlew assembleReleaseChecked on an emulator (
Pixel_10_Pro_XLAVD, API 37), against a local server withseed_demo, on a Sunday, so on the day-off layout:SMALL_TALL) read «4 урока · Алгеб… в 08:30» over three subjects, and «4 lessons · Алг… at 08:30» in English.The widget checked at two sizes at least: 2×1, 2×2 and 2×5
What is NOT covered
Documentation
docs/updated —docs/widget.mdsays what gives way on the smallest sizes, and that a settings change redraws the widgetCLAUDE.mdupdated — no command, module or boundary changedREADME.mdupdated — the gate table's count, with the close-out🤖 Generated with Claude Code