275. An activity menu page is not a device list page, it holds three rows, and that is what fills it¶
What prompted it¶
Chapter 1.2.1: put a composed activity on the screen so somebody can start it. composeActivity
builds the behaviour half, an entry in the keypad map table with its three lifecycle handlers and its
state transitions, and nothing on the remote can reach it. The reaching is a row on the activity menu.
The plan was to reuse composeMenuPage, the device list's page builder, on the strength of the two
menus sharing a row pitch. That plan is wrong and the code refused every real configuration, which is
what this section measures.
Sources checked first¶
docs/findings.md sections 125 (the hit page index and the panel to pixel grid), 239 (the device list
row and its per configuration marker), 240 (the device list page builder) and 273 (the four hop chain
from a menu row to an activity's keypad map). Logitech's own client was not read for this: the layout
in question is the compiled artefact's, and the four containers state it directly. The firmware was
not read either, for the same reason, and section 45's touch loop already says how a rectangle is
resolved.
The population¶
Four arch 12 (Harmony One) containers, which is the whole of it: this is a claim about a touch
panel, and arch 14 (Harmony 600 and 700), arch 9 (Harmony 525) and arch 8 (Harmony 880 and 885)
have none. one_config, one_config_unprogrammed, one_spare_before_sync and one_spare_after_sync,
between them 6 activity menu pages carrying 11 row rectangles.
Decision 16's question, answered plainly: one architecture, and no other architecture can have this answer. What the other three do instead is section 273's, where an activity is reached by a key.
The measurement¶
Per page, over all six:
| a device list page | an activity menu page | |
|---|---|---|
| row rectangles | 3 | 1, 2 or 3 |
| rectangle for the left button below the display | 1, on 29 of 29 pages | 1, on 6 of 6 |
| rectangle for the right one | none, on 29 of 29 | 1, on 6 of 6 |
| what those run | opcode 0x72, all 29 |
enter a mode, all 12 |
| rectangles either side of the display | 2 | 2 |
| bindings on those | 0 | 0 |
Which of the two bottom buttons the page enables is the whole difference, and it is why the device list's builder refuses an activity page rather than mangling it: a hit page is matched on the rectangles it offers, and these offer a different number of them. On the everyday Harmony One the two keys enter modes 176 and 100 from all three pages of the menu, so they are fixed destinations.
This section said the fourth rectangle of a device list page was a page flip and that the activity menu carried none, which was wrong in both halves. Danny corrected it from the remote in his hand and the correction measures cleanly:
- A Harmony One turns a list's pages with the two buttons beside the display, which are scans 46 and 47, and not one mode page binds either of them: 778 mode pages across four containers, all 778 offering both rectangles, 0 bindings. So neither menu has a flip to compare, and a page cannot change how paging behaves.
Where they are bound took two attempts and the first answer was wrong, so both are here.
keyCodes reports 0 bindings on those scans, and that is not evidence: it reports only bindings
that end in an infrared code, a trap CLAUDE.md already names about keyCodes versus
pageScans, met here a third time. Walking every tagged list instead found the keypad map's
fixed prefix: 8 bindings per configuration on all four, a press of each scan in each of
base slot 9 entries 1, 2, 3 and 4, all four unselected, which is section 272's prefix. Entry
1 is the only one giving the two scans different lists, a beep then opcode 0x0f with 0xFFA0
against 0xFFA1, which actions.ts places as a peripheral operation without decoding it. That
asymmetry is the shape "previous page" and "next page" would have, and saying so is a hypothesis.
Then "and nowhere else" turned out to be false, and the way it was false is the lesson. The
walk that produced it read a record.list field that does not exist on a ModeRecord, under an
if (... !== undefined), so it walked no mode record at all and reported a clean zero. The test
written from it did the same and passed. A mode record's own tagged list binds them 1076 times
across the four containers.
A screen with one page deadens the two page turn keys, and that is a rail¶
The rule inverted what a guess would have said, and it is exact on all four containers:
| a mode with | binds a page turn key |
|---|---|
| exactly one page | both, on 538 of 538 |
| more than one page | neither, on 0 of 58 |
596 modes, 1076 bindings, every one of them a press. And what the great majority bind is the null
instruction, opcode 0 with operand 0: 966 of the 1076, with 64 running a beep and an enter and the
other 46 three shapes of list: 30 of three null instructions, and 8 each of two shapes opening with
0x7f, which run a further list. This said 962 until section 293, which recounted it while testing the
same rule over the safe mode images too; nothing had asserted the figure, and the rule it supports is
unaffected.
So the paging is a default the firmware provides, and a screen with nowhere to page switches it off by binding the keys to nothing. A screen with several pages says nothing and gets the default.
That is a way to produce a file the remote accepts and mishandles, which is this project's worst hazard class: grow a one page menu to two pages and the second page is unreachable, with the container closing every count, both checksums passing and every page rendering. Every one page list menu here does it, 12 of 12: the activity menu and three device lists on each of the three configurations whose menus hold one page.
It is also why composeActivityMenuRow refusing to add a page is worth more than it looked. That
refusal was written because a new page needs a counter, a pool copy and a page count; it turns out to
need this as well, and todo.md 1.2.2 carries it.
* The rectangle above those is the left of the two physical buttons below the display. In device
mode the screen labels it "Activities"; in an activity it is "Options", with "Devices" on the
right. Every one of the 29 device list pages binds it and all 29 run opcode 0x72, which
actions.ts and docs/config-format.md name as mapping a state variable's value through base
slot 14, section 39, not as any kind of flip. Its operand's low byte is state variable 35 on the
everyday Harmony One and 40 on the factory one, so where that key goes depends on what is running,
which is what "back to the Activities list" has to do.
* The right bottom button has no rectangle at all on a device list page, 29 of 29, which is how
the format says a button is not enabled: a tap there resolves to nothing. Danny stated it before it
was measured.
How the wrong reading survived. PAGE_FLIP_OPCODE = 0x72 sat in compose.ts with the docstring
"the tagged list opcode a page flip rides on", declared and never used, while actions.ts, which
is the one opcode table, named the same opcode correctly the whole time. So it was a second copy of a
derivation that disagreed with the original, and unused, which is the one shape no test can catch. It
is gone rather than corrected. What it had already cost is the wording of four comments in the device
composer and the title of a test, all of which called a bottom key a flip; the byte operations under
them were right, since they key on the scan and never on the opcode.
The rows sit on the grid section 125 already established, which is what makes them safe to
compose: the same rectangle, 2600 panel units wide and 807 tall, starting at the panel's own left edge
of 1257, stepped down by LIST_ROW_PITCH. Eleven of eleven rows, four configurations. The pitch and
the left edge are imported and not measured again; what this section adds is that the activity
menu uses them.
A page holds three rows and no more, which is the number that had never been measured.
A scan code is a position, which is what makes a row safe to append¶
Section 125 read the lead byte as an index into the hit map. What follows from it, and is worth stating on its own because a composer depends on it: an area's scan code is its position in the page, the first being 48, the second 49, and so on, with the two edges carrying 46 and 47 wherever they are stored. So which scan is which row differs per page, and it does: on the everyday Harmony One's first activity page the three rows are scans 50, 51 and 52 and the two keys are 48 and 49, and on its second page the rows are 48, 49 and 50 and the keys are 51 and 52.
Two consequences. A row cannot be recognised by its scan code and has to be recognised by its geometry, which is what separates a row from a bottom key: a row spans the list from the panel's left edge, a bottom key is half as wide and taller. And a new row must be appended after the last content rectangle and before the two edges, because an area inserted anywhere earlier renumbers every area after it and silently moves an existing binding to another row.
What this closes: the generator is packing them after all¶
docs/how-an-activity-is-built.md scored prediction P7 and wrote, of the everyday Harmony One's eight
activities over pages of 3, 3 and 2, that three pages of 3, 3 and 2 is not a full page followed by a
remainder, so the generator is not simply packing them. That is wrong, and it was
wrong for a stated reason: the page's capacity had not been measured, so a full page could not be
recognised. It is three. So 3, 3 and 2 is a full page, a full page and the remainder, and the open
question "what decides when an activity menu page fills" has the ordinary answer.
The composer¶
composeActivityMenuRow in packages/codec/src/compose.ts, a separate builder from
composeMenuPage rather than a branch inside it, which is decision 17. The argument is the table
above: a builder that took both layouts would be a builder branching on which menu it was building,
and the two are going to diverge further rather than converge, since a menu of custom tap areas is a
direction the product may want.
It fills a page rather than adding one: the menu's last page is grown to its next row slot, and a menu whose last page already holds three is refused. That refusal is the honest edge of what has been built, since a new page needs a page counter, a second pool copy and a mode page count, none of which has been measured on an activity menu. It does not bite on the two configurations chapter 1 targets, whose activity menu holds one row of three.
Four insertions, each leaving the container parseable: the row's action list, beep then select the entry then clear the device mode marker; a hit page one rectangle wider, reused where the config has one with that exact geometry and composed otherwise; the binding, in the page's tagged list and in its pool copy; and the drawing, the row's background, its icon, a font and the label, inserted where the program's closing instruction begins so the close slides up and the census restamps what moves.
A font is a partial alphabet, and which one is complete is per configuration¶
Found while spelling the label and worth recording because a tabulated font index is what
DEVICE_ROW_FONT is. Over the 26 upper case letters, 26 lower case, ten digits and the space:
| container | fonts | the best set covers | which font that is |
|---|---|---|---|
one_config |
18 | 61 of 63 | 9 |
one_spare_after_sync |
17 | 58 of 63 | 9 |
one_config_unprogrammed |
18 | 55 of 63 | 5 |
A configuration carries only the glyphs it draws, so the complete set is wherever the compiler
happened to put it. fontThatSpells therefore prefers the font the page already draws its rows in and
falls back to the nearest in height that can spell the word. Height is the tie break rather than
coverage because the label is going into a row of fixed pitch: a set that spells the word in the wrong
size draws over its neighbours, where a set one glyph short simply refuses.
The check that is not a test¶
The three composed pages were drawn, which is the check a reader cannot make: a label half a row out passes every assertion here. All three render with no missing glyph and no undecoded picture, the new row's background and icon land on the grid, and on the everyday Harmony One the third row sits below the two the configuration already had.
What would falsify it¶
An arch 12 (Harmony One) mode page that binds scan 46 or 47, or a keypad map entry outside 1 to 4
that does, or a container binding fewer or more than 8 of them there. A one page mode binding fewer
than both, or a multi page mode binding either. A one page list menu whose two bindings are
anything but the null instruction. A device list page offering a rectangle
for the right bottom button, or an activity menu page offering only one of the two. A device list
bottom key running anything but opcode 0x72, or an activity menu one running anything but an enter.
A row off the LIST_ROW_PITCH grid, or one not starting at the panel's left edge. A fourth row slot
on any page. An area whose scan code is not its position. An activity menu with more than three
activities on one page.
Where it lands¶
docs/config-format.md, base slot 17, beside the hit page reading.docs/how-an-activity-is-built.md, whose P7 paragraph is corrected in place.docs/how-a-harmony-works.md, which is where what the buttons are belongs, since that is the product's own account and not the file's.CLAUDE.md's table of rails a writer must respect, since a deadened page key is a file the remote accepts and mishandles, and.claude/skills/writing-a-config/SKILL.mdfor the evidence.packages/codec/test/compose.test.ts, seven tests: the layout over six pages, the buttons over all 778 mode pages, the one page rule per mode record, the deadening over the 12 one page list menus, the composer keeping every binding it found, the whole chain fromcomposeActivitythrough to the four hop reader, and the refusals including the full page.
Section 274 | the archive | section 276. Section 275 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.