The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
feat(device): Focus inbox paged like the tabs, four lines and arrows, read only on a tap
0xdiego252dbcc5ee2b5f
diff --git a/devices/harness-device/firmware/main/ui/habitat/focus.c b/devices/harness-device/firmware/main/ui/habitat/focus.cindex ef3d8375b..1b51f00ca 100644--- a/devices/harness-device/firmware/main/ui/habitat/focus.c+++ b/devices/harness-device/firmware/main/ui/habitat/focus.c@@ -728,11 +728,13 @@ void ht_focus_face(ht_scene_t *s, const ht_character_face_t *f, uint8_t frame, u// Resting (no recap, no line of status) the mark stands where a full recap's does: the same place on both faces// (design 2026-10-06, focus-project.html "Rest": "same position as Recap").int full_cap = RECAP_AREA_Y + (RECAP_AREA_H - RECAP_LINES * RECAP_PITCH) / 2 + RECAP_BASELINE - RECAP_CAP;- int below = has_recap ? body_y + ht_pfont(rf)->ascent - RECAP_CAP : empty ? full_cap : body_y;- int size = has_recap && recap_n >= 1 && recap_n <= 3 ? 3 - recap_n : -1; // 0 1.5x, 1 1.75x, 2 2x; -1 1x+ // A status of its own ("Try again" after a failed voice turn) is one line in the middle: the mark sizes and sits+ // as over a one-line recap (owner, 2026-10-06).+ int below = has_recap || retry ? body_y + ht_pfont(rf)->ascent - RECAP_CAP : empty ? full_cap : body_y;+ int size = retry ? 2 : has_recap && recap_n >= 1 && recap_n <= 3 ? 3 - recap_n : -1; // 0 1.5x, 1 1.75x, 2 2x; -1 1x// Claude's block of a body reads larger than the others at the same size (owner, 2026-10-06): it stays at 1.5x// resting and over a recap of one to three lines, and 1x over four.- if (f->engine && !strcmp(f->engine, "claude") && ((has_recap && recap_n <= 3) || empty)) size = 0;+ if (f->engine && !strcmp(f->engine, "claude") && ((has_recap && recap_n <= 3) || empty || retry)) size = 0;int mark_top = TITLE_BOTTOM + (below - TITLE_BOTTOM - MARK_SIZE) / 2;// The name on the top curve, the octopus's arc; a tap there opens the pane list.diff --git a/devices/harness-device/firmware/main/ui/habitat/ui_habitat.c b/devices/harness-device/firmware/main/ui/habitat/ui_habitat.cindex cded4eed8..4797f04d1 100644--- a/devices/harness-device/firmware/main/ui/habitat/ui_habitat.c+++ b/devices/harness-device/firmware/main/ui/habitat/ui_habitat.c@@ -254,6 +254,7 @@ static ht_selection_t selection;static ht_workspace_t workspace;static ht_tab_carousel_t tab_carousel;static ht_tab_carousel_t pane_carousel; // Focus's pane picker, the same pages as the tabs (design 2026-10-06)+static ht_tab_carousel_t inbox_carousel; // Focus's inbox, paged the same way; it follows s.offset when at reststatic ht_carry_t carry;static ht_visit_t visit;static ht_form_t form;@@ -988,6 +989,11 @@ static void surface_tick(uint32_t now)}if (s.view == AGENTS && character.id == HT_CHARACTER_FOCUS && !display_is_asleep() &&ht_tab_carousel_tick(&pane_carousel, now)) change();+ if (s.view == INBOX && character.id == HT_CHARACTER_FOCUS && !display_is_asleep() &&+ ht_tab_carousel_tick(&inbox_carousel, now)) {+ s.offset = ht_tab_carousel_index(&inbox_carousel); // the page it settles on, rendered or not+ change();+ }if (home_caption_tick(now)) change();uint8_t phase = status_animated() ? ht_shimmer_phase(now * status_speed()) : 0;if (phase != s.status_phase) { s.status_phase = phase; change(); }@@ -1798,93 +1804,135 @@ static void render_notice(ht_scene_t *f)s.pressed == body + 1 ? FG : DIM, BG, "\xe2\x86\x90");}/*- * THE FOCUS INBOX — the LVGL drawer (notif_rebuild), from its own numbers, on the face's black (the owner's call; LVGL's was #16161c): the 60 x 32- * close pill at the top, then a 360 px column of cards from (53, 107), 12 apart, down to y 427. A- * card is [machine, muted] over [the engine's 20 px mark, or a green dot, and the agent's name in- * green] over the message in white, wrapped, cut at 100 characters. Only whole cards show; a vertical- * swipe moves the column a card at a time (habitat_touch). A tap on a card opens that agent as it- * always has; a tap on the cross goes back. No age: the cable carries no time for a notice.+ * THE FOCUS INBOX (design 2026-10-06, focus-project.html "Inbox", "Inbox, empty"; owner, 2026-10-06: the message as+ * long as the recap, arrows for the others): the close pill on top, then the notices paged like the tabs (320 px pages,+ * the same carousel). A notice is one block centred on the glass, 12 px between its rows: the machine (Inter 25,+ * #8a8a99), the engine's 20 px mark or a green dot and the agent's name (Inter 25, green), and the message in the+ * recap's type (Inter 30 on 43 px lines, #d6d6d2, 340 px, up to four lines, the last cut with "..."). No neighbour+ * peeks in: a faint ‹ / › (Inter 44, #8a8a99 at 45 %) on a side that has another notice, and a tap on that side pages+ * to it. While a finger drags, the pages slide and fade with their distance from the middle. "1/2" under it (Inter 20,+ * #8a8a99, at y 400). Empty: "No notification", Inter 25, #ada6ad, on the middle. The page on the glass is s.offset+ * (every update keeps using it): the pages follow it at rest, and it follows them while they move. Showing a page+ * sends no read receipt: a tap on the page opens that agent, and that reads it. The cross goes back. No age: the+ * cable carries no time for a notice.*/+static int css_line(const ht_font_t *font, int size, int top, int line)+{+ // The y of a run whose baseline sits where a browser puts Inter's: the line box's middle plus 0.363 of the size+ // ((ascender 0.969 - descender 0.242) / 2), so a design's `top` and `line-height` carry over as they are.+ return top + line / 2 + size * 93 / 256 - ht_pfont(font)->ascent;+}+static void inbox_line(ht_scene_t *f, int x, int y, const ht_font_t *font, uint16_t ink, const char *text)+{+ // A line clipped to whole letters inside the glass's band; its run stays, empty, when nothing of it shows.+ int before = f->count;+ if (text[0]) focus_clipped(f, x, y, font, ink, text, strlen(text), 8, 458);+ if (f->count == before) ht_text(f, 0, 0, 1, font, BG, BG, "");+}+static void inbox_page(ht_scene_t *f, int i, int cx, uint8_t alpha)+{+ enum { LINE_W = 340, MARK = 20, MARK_GAP = 8, DOT = 8, GAP = 12, ROW = 32, PITCH = 43, LINES = 4 };+ // One notice's block, centred on cx and the glass, every colour darkened to `alpha` (runs carry no alpha). Seven+ // runs whether or not there is a notice: machine, mark or dot, name, four message lines; the mark is a placeholder+ // while too faint to show (a sprite cannot fade).+ const ht_font_t *mid = &ht_lv_inter_25.base, *body = &ht_lv_inter_30.base;+ const cable_notif_t *n = i >= 0 && i < s.notice_count && alpha >= 8 ? &s.notice[i] : NULL;+ if (!n) {+ for (int k = 0; k < 3 + LINES; k++) ht_text(f, 0, 0, 1, mid, BG, BG, "");+ return;+ }+ uint16_t muted = ht_character_caption_ink(color(0x8a8a99), BG, alpha);+ uint16_t green = ht_character_caption_ink(color(0x04fe08), BG, alpha);+ uint16_t ink = ht_character_caption_ink(color(s.connected ? 0xd6d6d2 : 0x8a8a99), BG, alpha);+ const char *msg = n->summary[0] ? n->summary : n->question ? "Waiting for you" : "done";+ static ht_lv_label_t label; // 340 B: off the stack+ ht_lv_label(&label, body, msg, LINE_W, LINES, true);+ int lines = label.lines < LINES ? label.lines : LINES;+ char name[HT_TEXT_BYTES], machine[HT_TEXT_BYTES] = "";+ if (n->machine[0]) ht_fit_width(machine, sizeof machine, n->machine, LINE_W, mid);+ int a = find(n->agent_id), engine = a >= 0 ? ht_focus_engine_index(s.agents[a].engine) : -1;+ int lead = engine >= 0 ? MARK : DOT;+ ht_fit_width(name, sizeof name, n->name[0] ? n->name : n->agent_id, LINE_W - lead - MARK_GAP, mid);+ int h = (machine[0] ? ROW + GAP : 0) + ROW + GAP + lines * PITCH, top = (HT_HEIGHT - h) / 2;+ int mw = ht_measure(mid, machine);+ inbox_line(f, cx - mw / 2, css_line(mid, 24, top, ROW), mid, muted, machine);+ if (machine[0]) top += ROW + GAP;+ int nw = ht_measure(mid, name), row = cx - (lead + MARK_GAP + nw) / 2;+ if (row < 8 || row + lead > 458 || (engine >= 0 && alpha < 128)) ht_text(f, 0, 0, 1, mid, BG, BG, "");+ else if (engine >= 0) ht_icon(f, row, top + (ROW - MARK) / 2, &ht_icon_engine20[engine]);+ else ht_box(f, row, top + (ROW - DOT) / 2, DOT, DOT, DOT / 2, green, green);+ inbox_line(f, row + lead + MARK_GAP, css_line(mid, 24, top, ROW), mid, green, name);+ top += ROW + GAP;+ for (int k = 0; k < LINES; k++) {+ char t[HT_TEXT_BYTES] = "";+ int x = 0;+ if (k < lines) {+ const ht_lv_line_t *ln = &label.line[k];+ size_t len = ln->len < sizeof t ? ln->len : sizeof t - 1;+ memcpy(t, label.text + ln->at, len);+ while (len && (t[len - 1] == '\n' || t[len - 1] == '\r' || t[len - 1] == ' ')) len--;+ t[len] = 0;+ x = cx - ht_measure(body, t) / 2;+ }+ inbox_line(f, x, css_line(body, 30, top + k * PITCH, PITCH), body, ink, t);+ }+}static void render_focus_inbox(ht_scene_t *f){- enum { LIST_X = 53, LIST_Y = 107, LIST_W = 360, LIST_BOTTOM = 427, LIST_GAP = 12, CARD_R = 26,- PAD_H = 16, PAD_V = 14, ROW_GAP = 8, MARK = 20, MARK_GAP = 8, DOT = 8, MSG_GLYPHS = 100,- CLOSE_X = 203, CLOSE_Y = 16, CLOSE_W = 60, CLOSE_H = 32 };- if (s.offset >= s.notice_count) s.offset = s.notice_count - 1;- if (s.offset < 0) s.offset = 0;- const ht_font_t *small = &ht_lv_inter_20.base, *body = &ht_lv_inter_25.base,+ enum { PAGE = 320, ARROW_X = 26, ARROW_W = 60, CLOSE_X = 203, CLOSE_Y = 16, CLOSE_W = 60, CLOSE_H = 32 };+ const ht_font_t *small = &ht_lv_inter_20.base, *mid = &ht_lv_inter_25.base, *arrow = &ht_lv_inter_44.base,*cross = &ht_lv_montserrat_22.base;- uint16_t fg = color(0xeaeaf0);+ uint16_t fg = color(0xeaeaf0), close = color(0x171718), muted = color(0x8a8a99);+ uint16_t arrow_ink = ht_character_caption_ink(muted, BG, 115); // 45 %// make_close_pill: COL_FG at 10 % over black, the cross centred in it.- uint16_t close = color(0x171718);int cw = ht_measure(cross, HT_LV_CROSS);ht_box(f, CLOSE_X, CLOSE_Y, CLOSE_W, CLOSE_H, CLOSE_H / 2, close, close);ht_text(f, CLOSE_X + (CLOSE_W - cw) / 2, CLOSE_Y + (CLOSE_H - cross->height) / 2, cw, cross, fg,close, HT_LV_CROSS);s.hits[s.hit_count++] = (hit_t){{CLOSE_X - 40, 0, CLOSE_W + 80, CLOSE_Y + CLOSE_H + 20}, A_HOME, 0, true};- uint16_t card = color(0x23252f), rim = color(0x3d3f47), green = color(0x04fe08),- muted = color(0x8a8a99), ink = s.connected ? fg : muted;- // The default theme's button shadow, 50 % #9e9e9e a couple of pixels under the card, over black.- uint16_t shade = color(0x202020);- int inner = LIST_W - 2 - 2 * PAD_H, y = LIST_Y;- for (int i = s.offset; i < s.notice_count && s.hit_count < 24; i++) {- const cable_notif_t *n = &s.notice[i];- const char *full = n->summary[0] ? n->summary : n->question ? "Waiting for you" : "done";- char msg[HT_TEXT_BYTES * 3];- size_t len = 0, glyphs = 0;- while (full[len] && glyphs < MSG_GLYPHS && len + 8 < sizeof msg) {- len++;- while (full[len] && ((uint8_t)full[len] & 0xc0) == 0x80) len++;- glyphs++;- }- memcpy(msg, full, len);- msg[len] = 0;- if (full[len]) strcat(msg, "\xe2\x80\xa6");- ht_lv_label_t m;- int lines = ht_lv_label(&m, body, msg, inner, HT_LV_LINES, false);- if (lines > HT_LV_LINES) lines = HT_LV_LINES;- bool machine = n->machine[0] != 0;- int h = 2 + 2 * PAD_V + (machine ? small->height + ROW_GAP : 0) + small->height + ROW_GAP +- lines * body->height;- if (y + h > LIST_BOTTOM && i > s.offset) break;- ht_box(f, LIST_X, y + 2, LIST_W, h, CARD_R, shade, shade);- ht_box(f, LIST_X, y, LIST_W, h, CARD_R, card, rim);- s.hits[s.hit_count++] = (hit_t){{LIST_X, y, LIST_W, h}, A_NOTICE, i, s.connected};- int x = LIST_X + 1 + PAD_H, row = y + 1 + PAD_V;- ht_lv_label_t l;- if (machine) {- ht_lv_label(&l, small, n->machine, inner, 1, true);- ht_text(f, x, row, l.w ? l.w : 1, small, muted, card, l.text);- row += small->height + ROW_GAP;- }- // The engine's mark when the roster knows the agent, the green dot when it does not.- int a = find(n->agent_id), engine = a >= 0 ? ht_focus_engine_index(s.agents[a].engine) : -1;- int lead = engine >= 0 ? MARK : DOT;- if (engine >= 0) ht_icon(f, x, row + (small->height - MARK) / 2, &ht_icon_engine20[engine]);- else ht_box(f, x, row + (small->height - DOT) / 2, DOT, DOT, DOT / 2, green, green);- ht_lv_label(&l, small, n->name[0] ? n->name : n->agent_id, inner - lead - MARK_GAP, 1, true);- ht_text(f, x + lead + MARK_GAP, row, l.w ? l.w : 1, small, green, card, l.text);- row += small->height + ROW_GAP;- for (int k = 0; k < lines; k++) {- char text[HT_TEXT_BYTES];- size_t n_ = m.line[k].len < sizeof text ? m.line[k].len : sizeof text - 1;- memcpy(text, m.text + m.line[k].at, n_);- text[n_] = 0;- ht_text(f, x, row + k * body->height, m.line[k].w ? m.line[k].w : 1, body, ink, card, text);- }- y += h + LIST_GAP;+ if (!s.notice_count) {+ const char *empty = "No notification";+ int w = ht_measure(mid, empty);+ ht_text(f, (HT_WIDTH - w) / 2, css_line(mid, 25, 216, 35), w, mid, color(0xada6ad), BG, empty);+ s.notice_frame = 0;+ return;}- const cable_notif_t *top = &s.notice[s.offset];- s.notice_frame = top->read_on_dial ? 0 : top->display_revision;+ if (s.offset >= s.notice_count) s.offset = s.notice_count - 1;+ if (s.offset < 0) s.offset = 0;+ if (inbox_carousel.count != s.notice_count ||+ (!inbox_carousel.touching && !inbox_carousel.animating && ht_tab_carousel_index(&inbox_carousel) != s.offset))+ ht_tab_carousel_reset(&inbox_carousel, s.notice_count, s.offset);+ int current = ht_tab_carousel_index(&inbox_carousel);+ s.offset = current;+ for (int i = current - 1; i <= current + 1; i++) {+ // Each page slides with the finger and fades with its distance from the middle: gone a page away.+ int cx = 233 + (i * HT_TAB_PITCH - inbox_carousel.position) * PAGE / HT_TAB_PITCH, d = abs(cx - 233);+ inbox_page(f, i, cx, (uint8_t)(d >= PAGE / 2 ? 0 : 255 - d * 255 / (PAGE / 2)));+ }+ s.hits[s.hit_count++] = (hit_t){{ARROW_W, 110, HT_WIDTH - 2 * ARROW_W, 270}, A_NOTICE, current, s.connected};+ for (int side = -1; side <= 1; side += 2) {+ // A faint chevron on a side with another notice; that side's strip pages to it (see notice_contact).+ int i = current + side;+ bool more = i >= 0 && i < s.notice_count && !inbox_carousel.touching;+ const char *glyph = side < 0 ? "\xe2\x80\xb9" : "\xe2\x80\xba";+ int w = ht_measure(arrow, glyph), x = side < 0 ? ARROW_X - w / 2 : HT_WIDTH - ARROW_X - w / 2;+ ht_text(f, more ? x : 0, more ? 233 - arrow->height / 2 : 0, more ? w : 1, arrow, more ? arrow_ink : BG, BG,+ more ? glyph : "");+ if (more) s.hits[s.hit_count++] = (hit_t){{side < 0 ? 0 : HT_WIDTH - ARROW_W, 163, ARROW_W, 140}, A_NOTICE, i,+ s.connected};+ }+ char count[16];+ snprintf(count, sizeof count, "%d/%d", current + 1, s.notice_count);+ int w = ht_measure(small, count);+ ht_text(f, (HT_WIDTH - w) / 2, css_line(small, 20, 400, 28), w, small, muted, BG, count);+ // Paging past a notice does not read it (owner, 2026-10-06): only the tap that opens its agent does.+ s.notice_frame = 0;}static void render_list(ht_scene_t *f){if (s.view == TABS) { render_tabs(f); return; }- if (s.view == INBOX && s.notice_count) {- if (character.id == HT_CHARACTER_FOCUS) render_focus_inbox(f);- else render_notice(f);- return;- }+ if (s.view == INBOX && character.id == HT_CHARACTER_FOCUS) { render_focus_inbox(f); return; }+ if (s.view == INBOX && s.notice_count) { render_notice(f); return; }const char *title = s.view == MACHINES ? "machines" : "inbox";heading(f, title);int count = s.view == MACHINES ? s.machine_count : s.notice_count;@@ -2996,6 +3044,8 @@ void habitat_touch(bool down, int x, int y, uint32_t now)if (s.view == TABS && pressed_action.kind == A_TAB) ht_tab_carousel_begin(&tab_carousel, x, now);if (s.view == AGENTS && character.id == HT_CHARACTER_FOCUS && pressed_action.kind == A_AGENT)ht_tab_carousel_begin(&pane_carousel, x, now);+ if (s.view == INBOX && character.id == HT_CHARACTER_FOCUS && pressed_action.kind == A_NOTICE)+ ht_tab_carousel_begin(&inbox_carousel, x, now);ht_gesture_begin(&gesture, x, y, now, ((uint32_t)s.view << 8) | pressed_action.kind);if (pressed_action.kind != A_PET && pressed_action.kind != A_FORM_MAIN && pressed_action.kind != A_FORM_SAY &&pressed_action.kind != A_ANSWER && pressed_action.kind != A_DRAFT_SEND && pressed_action.kind != A_DRAFT_EDIT &&@@ -3021,6 +3071,8 @@ void habitat_touch(bool down, int x, int y, uint32_t now)}} else if (s.view == AGENTS && character.id == HT_CHARACTER_FOCUS) {if (gesture.axis == 2 && ht_tab_carousel_move(&pane_carousel, x, now)) change();+ } else if (s.view == INBOX && character.id == HT_CHARACTER_FOCUS && inbox_carousel.touching) {+ if (gesture.axis == 2 && ht_tab_carousel_move(&inbox_carousel, x, now)) change();} else if ((s.view == AGENTS || s.view == SETTINGS) && gesture.axis == 1) {tabs_move((s.last_y - y) * (scroll_reversed ? -1 : 1));} else if (s.view == DRAFT && gesture.axis == 1) {@@ -3043,6 +3095,8 @@ void habitat_touch(bool down, int x, int y, uint32_t now)ht_touch_result_t result = ht_gesture_end(&gesture, x, y, now);bool pane_contact = s.view == AGENTS && character.id == HT_CHARACTER_FOCUS && pane_carousel.touching;bool pane_tap = pane_contact && ht_tab_carousel_end(&pane_carousel, x, gesture.axis == 2, now);+ bool notice_contact = s.view == INBOX && character.id == HT_CHARACTER_FOCUS && inbox_carousel.touching;+ bool notice_tap = notice_contact && ht_tab_carousel_end(&inbox_carousel, x, gesture.axis == 2, now);if (s.view == AGENTS && character.id == HT_CHARACTER_FOCUS) {// the pages own the contact (pane_contact, below)} else if (!s.touch_cancelled && (s.view == AGENTS || s.view == SETTINGS) && gesture.axis == 1)@@ -3065,6 +3119,15 @@ void habitat_touch(bool down, int x, int y, uint32_t now)index < s.tab_count && !strcmp(pressed_action.id, s.tabs[index].id)) dispatch(pressed_action);tabs_sync();change();+ } else if (notice_contact) {+ // Browsing the notices changes nothing but the page (and so s.offset); a tap on the page opens that agent.+ int index = pressed_action.value;+ if (notice_tap && result == HT_TOUCH_TAP && pressed_action.kind == A_NOTICE && index >= 0 &&+ index < s.notice_count && !strcmp(pressed_action.id, s.notice[index].agent_id)) {+ if (index != ht_tab_carousel_index(&inbox_carousel)) ht_tab_carousel_go(&inbox_carousel, index, now);+ else dispatch(pressed_action); // an arrow's side pages; the page opens+ }+ change();} else if (pane_contact) {// Browsing the pane pages changes nothing; a tap on a page (or Done) opens that pane.int index = pressed_action.value;@@ -3237,6 +3300,7 @@ uint32_t habitat_next_wake_ms(void)delay = 125;if (s.view == TABS && tab_carousel.animating && !display_is_asleep()) delay = 16;if (s.view == AGENTS && pane_carousel.animating && !display_is_asleep()) delay = 16;+ if (s.view == INBOX && inbox_carousel.animating && !display_is_asleep()) delay = 16;if (selection.pending && delay > 100) delay = 100;if (visit.pending && delay > 100) delay = 100;if (s.view == FORM && delay > 100) delay = 100;diff --git a/devices/harness-device/firmware/main/ui/habitat/workspace.c b/devices/harness-device/firmware/main/ui/habitat/workspace.cindex 72c38b203..44d486c1e 100644--- a/devices/harness-device/firmware/main/ui/habitat/workspace.c+++ b/devices/harness-device/firmware/main/ui/habitat/workspace.c@@ -135,6 +135,15 @@ bool ht_tab_carousel_move(ht_tab_carousel_t *c, int x, uint32_t now)}return old != c->position;}+void ht_tab_carousel_go(ht_tab_carousel_t *c, int index, uint32_t now)+{+ if (c->touching || c->count <= 0) return;+ ht_tab_carousel_tick(c, now);+ c->target = bounded(index, 0, c->count - 1) * HT_TAB_PITCH;+ c->from = c->position;+ c->animation_at = now;+ c->animating = c->position != c->target;+}bool ht_tab_carousel_end(ht_tab_carousel_t *c, int x, bool horizontal, uint32_t now){if (!c->touching) return false;diff --git a/devices/harness-device/firmware/main/ui/habitat/workspace.h b/devices/harness-device/firmware/main/ui/habitat/workspace.hindex 2c5cf1e63..737631271 100644--- a/devices/harness-device/firmware/main/ui/habitat/workspace.h+++ b/devices/harness-device/firmware/main/ui/habitat/workspace.h@@ -41,3 +41,5 @@ void ht_tab_carousel_begin(ht_tab_carousel_t *, int x, uint32_t now);bool ht_tab_carousel_move(ht_tab_carousel_t *, int x, uint32_t now);bool ht_tab_carousel_end(ht_tab_carousel_t *, int x, bool horizontal, uint32_t now);bool ht_tab_carousel_tick(ht_tab_carousel_t *, uint32_t now);+// Settle on `index` from wherever it is (an arrow's tap), the way a swipe settles.+void ht_tab_carousel_go(ht_tab_carousel_t *, int index, uint32_t now);diff --git a/devices/harness-device/firmware/test/test_character.c b/devices/harness-device/firmware/test/test_character.cindex 2e9cdc580..d9e9c0a30 100644--- a/devices/harness-device/firmware/test/test_character.c+++ b/devices/harness-device/firmware/test/test_character.c@@ -914,6 +914,22 @@ static void focus_face(void)assert(ht_focus_pet_next_ms(&f, "") == nx * ws->step_ms);}assert(distinct == 2); // two body poses (eyes open, ^ ^ on the flick); a bob moves them+ // "Try again" (a status of its own, after a failed voice turn): the mark as over a one-line recap — 2x, Claude+ // 1.5x — centred between the name's foot and the line's capitals (owner, 2026-10-06).+ for (unsigned pe = 0; pe < ht_pet_count; pe++) {+ const ht_pet_t *pt = &ht_pets[pe];+ ht_character_face_t g = {.recipient = "x", .engine = pt->engine, .activity = "", .status = "Try again",+ .hint = "", .detail = "", .mood = HT_CHARACTER_IDLE, .clock_ms = 0};+ ht_scene_t sc; ht_scene_clear(&sc, 0); ht_character_face(&sc, &c, &g, 0xffff, "");+ const ht_run_t *m = &sc.runs[1];+ bool claude = !strcmp(pt->engine, "claude");+ const ht_cell_frame_t *fr0 = &pt->cells[pt->loops[HT_PET_IDLE][0].frame];+ int h = (fr0->rows * fr0->cell * (claude ? 6 : 8) + 7) / 8;+ assert(m->sprite.cells == fr0->cells && m->sprite.height == h && m->sprite.zoom == (claude ? 6 : 0));+ int cap = 233 - ht_lv_inter_30.base.height / 2 + ht_lv_inter_30.ascent - 22;+ int dy0 = pt->loops[HT_PET_IDLE][0].dy * (claude ? 6 : 8) / 4;+ assert(m->y - dy0 == 44 + (cap - 44 - h) / 2);+ }// Every engine's working mascot (the scene's frames, props apart) is centred on the glass (design 2026-10-06).for (unsigned pe = 0; pe < ht_pet_count; pe++) {const ht_pet_scene_t *w = ht_pets[pe].working_scene;diff --git a/devices/harness-device/firmware/test/test_touch_ui.py b/devices/harness-device/firmware/test/test_touch_ui.pyindex 6896572ef..1f78a5034 100644--- a/devices/harness-device/firmware/test/test_touch_ui.py+++ b/devices/harness-device/firmware/test/test_touch_ui.py@@ -106,6 +106,7 @@ static ht_draft_t draft;static ht_workspace_t workspace;static ht_tab_carousel_t tab_carousel;static ht_tab_carousel_t pane_carousel;+static ht_tab_carousel_t inbox_carousel;static int tab_switches;static char tab_target[64];static action_t tab_queued;@@ -210,7 +211,7 @@ for name in ['copy', 'recap_preview', 'notice_unread', 'notice_was_read', 'noticcode += function(name)code += function('render_settings') + function('ui_visit_state')code += function('ui_project_known') + function('ui_focus_project') + function('ui_apply_pending_focus')-code += function('focus_centred') + function('focus_header') + function('focus_clipped') + function('tabs_move') + function('tab_name') + function('tab_split') + function('tab_fade') + function('tab_neighbour') + function('focus_carousel') + function('tab_label') + function('render_focus_tabs') + function('pane_label') + function('render_focus_panes') + function('render_agents') + function('render_tabs') + function('page_controls') + function('render_notice') + function('render_focus_inbox') + function('render_list')+code += function('focus_centred') + function('focus_header') + function('focus_clipped') + function('tabs_move') + function('tab_name') + function('tab_split') + function('tab_fade') + function('tab_neighbour') + function('focus_carousel') + function('tab_label') + function('render_focus_tabs') + function('pane_label') + function('render_focus_panes') + function('render_agents') + function('render_tabs') + function('page_controls') + function('render_notice') + function('css_line') + function('inbox_line') + function('inbox_page') + function('render_focus_inbox') + function('render_list')for name in ['notice_remove', 'notice_sync_view', 'notice_selection', 'notice_restore_selection', 'notice_add', 'ui_notify_task_done', 'ui_notif_seen', 'ui_notif_read', 'ui_notif_replace', 'ui_notif_open', 'ui_question_close', 'ui_answer_receipt']:code += function(name)for name in ['event', 'ui_project_emit', 'ui_project_restore_event', 'ui_project_clear_event', 'ui_project_set_name', 'ui_project_remove', 'ui_project_clear_all', 'ui_project_apply_order']:@@ -298,7 +299,7 @@ static void scene_take(void) {static void reset(void) {host_features=31; fake_ms=0; fake_asleep=false; present_scene=true;memset(&visit,0,sizeof visit); visit_sends=visit_wire=returns=0; question_pending=false;- memset(&tab_carousel,0,sizeof tab_carousel); memset(&pane_carousel,0,sizeof pane_carousel);+ memset(&tab_carousel,0,sizeof tab_carousel); memset(&pane_carousel,0,sizeof pane_carousel); memset(&inbox_carousel,0,sizeof inbox_carousel);memset(&workspace,0,sizeof workspace); tab_switches=0; tab_target[0]=0;memset(&selection,0,sizeof(selection)); selections=0;memset(&carry,0,sizeof(carry)); carry_prepares=carry_drops=0; voice_context[0]=0;@@ -2226,18 +2227,61 @@ int main(int argc, char **argv) {#undef VOICE_SCENE#undef VOICE_BARS}- // THE FOCUS INBOX: the close pill, then a column of cards — machine, mark or dot + agent, message.+ // THE FOCUS INBOX (design 2026-10-06; owner, 2026-10-06: four lines and arrows): the close pill, then the notices+ // paged like the tabs. A notice is a block centred on the glass — machine (Inter 25, muted), mark + name (Inter 25,+ // green), the message in the recap's Inter 30 on up to four lines — with a faint › on the side that has more, and+ // "1/2" at y 400. Showing it reads nothing. A swipe pages (s.offset follows), a tap on an arrow's side pages back,+ // a tap on the page opens that agent, the cross goes back; the run count holds while the finger drags.reset(); ht_character_select(&character, HT_CHARACTER_FOCUS); strcpy(s.agents[0].engine, "claude");{- cable_notif_t rows[2]={{.agent_id="a",.name="Payments refactor",.machine="MacBook",.summary="Retry queue shipped."},+ cable_notif_t rows[2]={{.agent_id="a",.name="Payments refactor",.machine="MacBook",+ .summary="Shipped the retry queue, moved the parser tests to new fixtures and fixed the flaky upload check on CI so the nightly build is green again."},{.agent_id="b",.name="Landing page",.machine="Studio Mac",.summary="Hero and pricing are in."}};ui_notif_replace(rows,2); ui_notif_open(); scene_take(); portrait_focus(dir,"focus-inbox");assert(s.view == INBOX && scene.background == BG); // black, like the face- int cards = 0;- for (int i = 0; i < s.hit_count; i++) cards += s.hits[i].action == A_NOTICE;- assert(cards == 2);- tap(1000, 233, 190); assert(desktop_opens == 1 && !strcmp(opened_agent, "a")); // a card opens its agent- ui_notif_open(); scene_take(); tap(2000, 233, 32); assert(s.view == HOME); // the cross goes back+ assert(habitat_scene_receipt() == 0 && !s.notice[0].read_on_dial); // shown is not read: only a tap reads+ bool machine=false, name=false, right=false, left=false; int lines = 0, last = 0, name_y = -1, first_y = 999;+ for (int i = 0; i < scene.count; i++) {+ const ht_run_t *r = &scene.runs[i];+ if (!strcmp(r->text,"MacBook")) machine = r->font == &ht_lv_inter_25.base && r->fg == color(0x8a8a99) && abs(r->x + r->w/2 - 233) <= 1;+ if (!strcmp(r->text,"Payments refactor")) { name = r->font == &ht_lv_inter_25.base && r->fg == color(0x04fe08); name_y = r->y; }+ if (r->font == &ht_lv_inter_30.base && r->text[0]) {+ assert(r->fg == color(0xd6d6d2) && abs(r->x + r->w/2 - 233) <= 1 && r->x >= 60 && r->x + r->w <= 406);+ lines++; last = i; if (r->y < first_y) first_y = r->y;+ }+ right |= !strcmp(r->text,"\xe2\x80\xba") && r->x > 400;+ left |= !strcmp(r->text,"\xe2\x80\xb9");+ assert(!strstr(r->text,"Studio") && !strstr(r->text,"Landing")); // no neighbour peeks in+ }+ assert(machine && name && right && !left && lines == 4 && name_y < first_y);+ assert(strstr(scene.runs[last].text, "...")); // the fourth line is cut+ int runs = scene.count;+ for (int d = -200; d <= 200; d += 40) {+ int keep = inbox_carousel.position; inbox_carousel.position = keep + d;+ ht_scene_t dragged; ht_scene_clear(&dragged, BG); s.hit_count = 0; render_list(&dragged);+ assert(dragged.count == runs);+ for (int i = 0; i < dragged.count; i++) { ht_rect_t b = ht_run_bounds(&dragged.runs[i]); assert(b.x >= 0 && b.x + b.w <= HT_WIDTH); }+ inbox_carousel.position = keep;+ }+ scene_take();+ habitat_touch(true,300,233,1000);+ for (int k=1;k<=5;k++) habitat_touch(true,300-k*12,233,1000+k*40);+ habitat_touch(false,240,233,1260);+ for (uint32_t t=1260;t<=1900;t+=16) surface_tick(t);+ scene_take();+ assert(s.view == INBOX && s.offset == 1 && !desktop_opens);+ bool two=false, back=false, more=false;+ for (int i = 0; i < scene.count; i++) {+ two |= !strcmp(scene.runs[i].text,"2/2");+ back |= !strcmp(scene.runs[i].text,"\xe2\x80\xb9") && scene.runs[i].x < 60;+ more |= !strcmp(scene.runs[i].text,"\xe2\x80\xba");+ }+ assert(two && back && !more);+ tap(2000, 20, 233); // the left arrow's side pages back+ for (uint32_t t=2100;t<=2600;t+=16) surface_tick(t);+ scene_take(); assert(s.view == INBOX && s.offset == 0 && !desktop_opens);+ tap(3000, 233, 233); assert(desktop_opens == 1 && !strcmp(opened_agent, "a")); // a tap on the page opens it+ ui_notif_open(); scene_take(); tap(3500, 233, 32); assert(s.view == HOME); // the cross goes back}// An open question on Focus: shown on the home face, in the recap's place, and nowhere else.reset(); ht_character_select(&character, HT_CHARACTER_FOCUS); strcpy(s.agents[0].engine, "claude");@@ -2615,11 +2659,12 @@ int main(int argc, char **argv) {assert(action_enabled(A_INBOX));s.offset = 3; FOCUS_PAGE("lit-controls-scrolled");s.offset = 0; s.pressed = 1; FOCUS_PAGE("lit-controls-pressed");- // The empty inbox ("All caught up.") and the machines list.+ // The empty inbox ("No notification", design 2026-10-06) and the machines list.reset(); ht_character_select(&character, HT_CHARACTER_FOCUS); view(INBOX); s.notice_count = 0; FOCUS_PAGE("lit-inbox-empty");{bool caught = false;- for (int i = 0; i < scene.count; i++) caught |= !strcmp(scene.runs[i].text, "All caught up.") && focus_inter(scene.runs[i].font);+ for (int i = 0; i < scene.count; i++) caught |= !strcmp(scene.runs[i].text, "No notification") && scene.runs[i].font == &ht_lv_inter_25.base &&+ scene.runs[i].fg == color(0xada6ad);assert(caught);}reset(); ht_character_select(&character, HT_CHARACTER_FOCUS); view(MACHINES); s.machine_count = 2;