Skip to content

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.

fix(harness-pro): the top band is the tabs', the bell takes the corner

0xdiego25e5c1355858ec
diff --git a/devices/harness-device/firmware/main/ui/metrics_round466.h b/devices/harness-device/firmware/main/ui/metrics_round466.h
index 146dcb816..16a3dcd7d 100644
--- a/devices/harness-device/firmware/main/ui/metrics_round466.h
+++ b/devices/harness-device/firmware/main/ui/metrics_round466.h
@@ -113,3 +113,11 @@
// tile is what the carousel already is. The dial's home stays the carousel.
#define UI_DESK_GRID 0
+// ── the notification pill ───────────────────────────────────────────────────────────────────────────
+// WHAT SHIPPED, unchanged: a small badge in the top band, where a 466 circle has room for a small badge
+// and nothing else. The square's version is a corner control and is sized for a thumb — see its file.
+#define NOTIF_FAB_PAD_H 13
+#define NOTIF_FAB_PAD_V 4
+#define NOTIF_PILL_FONT (&lv_font_montserrat_22)
+#define NOTIF_PILL_GAP 6
+
diff --git a/devices/harness-device/firmware/main/ui/metrics_square720.h b/devices/harness-device/firmware/main/ui/metrics_square720.h
index 7b9560cb9..ba190001b 100644
--- a/devices/harness-device/firmware/main/ui/metrics_square720.h
+++ b/devices/harness-device/firmware/main/ui/metrics_square720.h
@@ -137,6 +137,41 @@
#define DESK_STRIP_H 52
#define DESK_TAB_H 52
#define DESK_TAB_NAME_MAX 300
+// THE TOP BAND IS THE TABS' AND NOTHING ELSE'S.
+//
+// The bell had a seat here for one build, and it cost twice. With nothing to report the seat was an
+// empty 84px gap that read as a bug; to make the seat at all the strip had to give up the width, which
+// pushed the last tab under a fade — and a fade is a gradient, not an affordance, so the screen stopped
+// saying there were more tabs at all (owner, 2026-09-28, two photos).
+//
+// The bell went to the bottom-right corner instead, where this face had room going spare. See
+// NOTIF_FAB_* below and the align in ui_screens.c.
+#define DESK_STRIP_W (UI_FACE_W - 2 * DESK_STRIP_X)
+
+// ── the notification button, bottom right ───────────────────────────────────────────────────────────
+// A FLOATING control, not a reserved one: it is drawn only when something is waiting, so it can sit
+// over whatever is behind it — the desk's corner tile, the empty air under an agent — and cost nothing
+// on every screen where the count is zero, which is most of them.
+#define NOTIF_FAB_MARGIN SCREEN_PAD
+
+// 30% SMALLER AND HALF LIT, because it is not news — it is a count that sits there.
+//
+// At 64px in full blue it was the brightest thing on a face that is on all day, in the corner the eye
+// rests in, saying only "two things are waiting" (owner, 2026-09-28: "nó sáng quá gây distract"). A
+// notification the size of a button and the brightness of an alert asks to be dealt with now; this one
+// does not. So it keeps its corner and stops shouting from it.
+//
+// Every number below is the old one times 0.7, and the font follows: montserrat_22's line box is ~26,
+// so 26 + 2*10 = NOTIF_FAB_H, and the circle is still full rather than a ring around a small mark.
+#define NOTIF_FAB_H 46
+#define NOTIF_FAB_PAD_H 15
+#define NOTIF_FAB_PAD_V 10
+#define NOTIF_PILL_FONT (&lv_font_montserrat_22)
+#define NOTIF_PILL_GAP 7
+// On the OBJECT, not on the background: the fill, the glyph and the count dim together, so it reads as
+// one quiet control rather than as bright text on a faded disc.
+#define NOTIF_FAB_OPA LV_OPA_50
+#define NOTIF_FAB_SHADOW 17
#define DESK_MARK_LG 40
#define DESK_MARK_MD 32
diff --git a/devices/harness-device/firmware/main/ui/touch.c b/devices/harness-device/firmware/main/ui/touch.c
index ad9ff013f..03ff58c5a 100644
--- a/devices/harness-device/firmware/main/ui/touch.c
+++ b/devices/harness-device/firmware/main/ui/touch.c
@@ -263,26 +263,32 @@ static void swipe_track(bool pressed, uint16_t x, uint16_t y)
int home_edge = reader ? READER_HOME_EDGE_PX : BOTTOM_EDGE_PX;
// HOME gesture: an upward swipe that STARTED at the bottom edge → jump to Overview. (y grows downward;
// the driver already applies the panel mirror, so sy near y_max = the physical bottom.)
- // THE DESK OWNS THE GLASS WHILE IT IS UP, AND IT IS HOME. Its tiles take taps through LVGL; what
- // this classifier must not do is act on the carousel underneath — a horizontal swipe here would
- // walk agents on a screen that is not showing them, and the home swipe has nowhere to go, because
- // this IS where home goes. So on the desk it answers nothing.
+ // THE DESK OWNS THE GLASS WHILE IT IS UP — with ONE exception.
+ //
+ // Everything this classifier would do while the grid is up acts on the carousel UNDERNEATH: a
+ // sideways swipe walks agents on a screen that is not showing them, and the deferred tap belongs
+ // to the tile behind. Both stay refused. (The grid's own tiles are pressed through LVGL's indev,
+ // not through here, which is why refusing them costs nothing.)
+ //
+ // The exception is the bottom-edge swipe up. It is the way to the Overview from anywhere, and
+ // swallowing it here left that screen — the one that names the machine and carries Settings and
+ // the fleet count — with no way in at all while the grid was up (owner, 2026-09-28).
#if UI_DESK_GRID
- if (!voice && ui_desk_is_open()) {
- /* home is already on screen — nothing above it, nothing beside it */
- } else
+ const bool desk_holds = !voice && ui_desk_is_open();
+#else
+ const bool desk_holds = false;
#endif
if (!voice && sy >= home_edge && dy < -SWIPE_MIN_PX && abs(dy) > abs(dx)) {
ESP_LOGI(TAG, "gesture: home (dy=%d)", dy);
ui_home_overview();
- } else if (!voice && (dx > SWIPE_MIN_PX || dx < -SWIPE_MIN_PX) && abs(dx) > abs(dy)) {
+ } else if (!voice && !desk_holds && (dx > SWIPE_MIN_PX || dx < -SWIPE_MIN_PX) && abs(dx) > abs(dy)) {
ESP_LOGI(TAG, "gesture: swipe %+d (dx=%d dy=%d)", dx > 0 ? 1 : -1, dx, dy);
ui_swipe_end(dx > 0 ? 1 : -1); // reader → back to the agent; carousel screens → wrap next/prev
}
// A vertical drag is NOT classified here any more — it went out as it happened (above). One
// gesture cannot mean two things: while it also opened the detail reader, every scroll ended by
// opening a screen nobody asked for. Tapping the recap card opens it, which is the route it kept.
- else if (abs(dx) < LONG_MOVE_PX && abs(dy) < LONG_MOVE_PX
+ else if (!desk_holds && abs(dx) < LONG_MOVE_PX && abs(dy) < LONG_MOVE_PX
&& lv_tick_elaps(t0) < TAP_MAX_MS) { // near-still TAP
// A tap while RECORDING always stops the voice — on EVERY screen, including the reader (this is the
// only touch way to end a turn started by double-tap there). The deferred open/close tap, however,
diff --git a/devices/harness-device/firmware/main/ui/ui_screens.c b/devices/harness-device/firmware/main/ui/ui_screens.c
index be62b90e3..a609c41f7 100644
--- a/devices/harness-device/firmware/main/ui/ui_screens.c
+++ b/devices/harness-device/firmware/main/ui/ui_screens.c
@@ -2385,19 +2385,51 @@ void ui_init(void)
lv_obj_set_style_bg_color(s_notif_pill, lv_color_hex(0x006fff), 0); // Figma blue 🔔 badge
lv_obj_set_style_bg_opa(s_notif_pill, LV_OPA_COVER, 0);
lv_obj_set_style_radius(s_notif_pill, LV_RADIUS_CIRCLE, 0);
- lv_obj_set_style_pad_hor(s_notif_pill, 13, 0);
- lv_obj_set_style_pad_ver(s_notif_pill, 4, 0);
+ lv_obj_set_style_pad_hor(s_notif_pill, NOTIF_FAB_PAD_H, 0);
+ lv_obj_set_style_pad_ver(s_notif_pill, NOTIF_FAB_PAD_V, 0);
+#if UI_DESK_GRID
+ /*
+ * BOTTOM RIGHT, floating, and only when there is something to say.
+ *
+ * The top band belongs to the tabs. Down here the face had room going spare — an agent tile's
+ * words end around y=560 and the grid's last row is the only thing that comes near — and a control
+ * that appears and disappears is exactly what a corner is for: nothing reserves the space, so there
+ * is no state in which the screen looks like it is missing a piece.
+ */
+ /*
+ * NO min_height. The size comes from the glyphs.
+ *
+ * It was pinned to 64px while the bell inside stayed at montserrat_14 — a 14px mark in a 64px
+ * circle, with 25px of empty blue all round it. That is not a control, it is a hole with a dot in
+ * it (owner, 2026-09-28: "vẽ vòng tròn to đùng, cái icon noti bé tí, nhìn như lỗi UI").
+ *
+ * So the glyphs are sized for this face and the padding is what makes the circle: montserrat_30
+ * for both, 14px of vertical padding, and the box lands at NOTIF_FAB_H on its own — full, and
+ * still the right size for a thumb.
+ */
+ lv_obj_set_style_opa(s_notif_pill, NOTIF_FAB_OPA, 0);
+ lv_obj_set_style_shadow_width(s_notif_pill, NOTIF_FAB_SHADOW, 0);
+ lv_obj_set_style_shadow_opa(s_notif_pill, LV_OPA_40, 0);
+ lv_obj_set_style_shadow_color(s_notif_pill, lv_color_black(), 0);
+ lv_obj_align(s_notif_pill, LV_ALIGN_BOTTOM_RIGHT, -NOTIF_FAB_MARGIN, -NOTIF_FAB_MARGIN);
+#else
lv_obj_align(s_notif_pill, LV_ALIGN_TOP_MID, 0, 22);
+#endif
lv_obj_set_style_bg_opa(s_notif_pill, LV_OPA_80, LV_STATE_PRESSED); // it presses now, so it says so
+#if UI_DESK_GRID
+ // …and at half opacity a background that merely goes to 80% is not a visible press. The whole
+ // control comes UP to full on touch instead: quiet until a thumb is on it, then plainly lit.
+ lv_obj_set_style_opa(s_notif_pill, LV_OPA_COVER, LV_STATE_PRESSED);
+#endif
lv_obj_set_flex_flow(s_notif_pill, LV_FLEX_FLOW_ROW);
lv_obj_set_flex_align(s_notif_pill, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
- lv_obj_set_style_pad_column(s_notif_pill, 6, 0);
+ lv_obj_set_style_pad_column(s_notif_pill, NOTIF_PILL_GAP, 0);
{ lv_obj_t *bell = lv_label_create(s_notif_pill);
- lv_obj_set_style_text_font(bell, &lv_font_montserrat_14, 0);
+ lv_obj_set_style_text_font(bell, NOTIF_PILL_FONT, 0);
lv_obj_set_style_text_color(bell, COL_FG, 0);
lv_label_set_text(bell, LV_SYMBOL_BELL);
s_notif_pill_lbl = lv_label_create(s_notif_pill);
- lv_obj_set_style_text_font(s_notif_pill_lbl, &lv_font_montserrat_22, 0);
+ lv_obj_set_style_text_font(s_notif_pill_lbl, NOTIF_PILL_FONT, 0);
lv_obj_set_style_text_color(s_notif_pill_lbl, COL_FG, 0);
lv_label_set_text(s_notif_pill_lbl, "0"); }
lv_obj_add_flag(s_notif_pill, LV_OBJ_FLAG_HIDDEN);
@@ -6368,9 +6400,21 @@ static void desk_only_agent(char *out, size_t cap)
*/
static void tabline_sync(void)
{
+ /*
+ * THE OVERVIEW IS IN A TAB TOO, and used to be on the hidden list with Settings and Machines.
+ *
+ * That was wrong on its own terms — the Overview names the machine whose window owns these very
+ * tabs — and it became visibly wrong the moment the bottom-edge swipe started landing there: the
+ * line vanished and, if nothing re-armed a landing, never came back. Which is exactly how it looks
+ * from the outside: plug the device into another computer, plug it back, and the tabs are gone
+ * (owner, 2026-09-28).
+ *
+ * Settings, Machines and the pickers stay hidden. Those are not in a tab, and a tab line over them
+ * is an offer to leave a screen that has its own job.
+ */
const bool want = !display_is_asleep() && !s_notif_open && s_swarm_count > 0 &&
(s_desk_open ||
- (lv_screen_active() == scr_projects && !s_overview_active &&
+ (lv_screen_active() == scr_projects &&
!s_settings_active && !s_machines_active));
if (!want) { set_hidden(s_tabline, true); return; }
@@ -6378,7 +6422,7 @@ static void tabline_sync(void)
s_tabline = lv_obj_create(lv_layer_top());
lv_obj_remove_style_all(s_tabline);
lv_obj_set_pos(s_tabline, DESK_STRIP_X, DESK_STRIP_Y);
- lv_obj_set_size(s_tabline, UI_FACE_W - 2 * DESK_STRIP_X, DESK_STRIP_H);
+ lv_obj_set_size(s_tabline, DESK_STRIP_W, DESK_STRIP_H);
lv_obj_set_flex_flow(s_tabline, LV_FLEX_FLOW_ROW);
lv_obj_set_flex_align(s_tabline, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
lv_obj_set_style_pad_column(s_tabline, 6, 0);
@@ -6577,11 +6621,16 @@ void ui_home_overview(void)
if (s_bright_dragging) return; // a brightness-slider drag on Settings is not a home swipe (mirror ui_swipe_*)
ui_notif_close(); // no-op if closed; takes/releases the lock itself (must not nest inside our lock)
#if UI_DESK_GRID
- // On a face with room for the shape, HOME IS THE SHAPE. The carousel still exists — it is what walks
- // between agents once you are in one — but it stops being how you find anything, so the gesture that
- // used to land on the Overview ring lands on the desk instead.
- ui_desk_open();
- return;
+ // THE BOTTOM-EDGE SWIPE MEANS THE OVERVIEW ON BOTH FACES.
+ //
+ // It used to open the desk here, on the reading that a face with room for the shape should make the
+ // shape its home. The desk IS still where this board lands and what back goes to — but that is not
+ // the same as owning this gesture, and giving it away left the Overview with no way in at all: the
+ // desk covers the carousel, so the one screen that names the machine and carries Settings and the
+ // fleet count could only be reached by leaving the grid sideways (owner, 2026-09-28).
+ //
+ // The desk has its own way back (pinch, or the back key) and does not need this one too.
+ ui_desk_close();
#endif
display_lock();
swarm_picker_close();
@@ -6682,8 +6731,16 @@ static void notif_badge_apply(void)
}
// The Overview has its own bell on the lower arc, with the count as a badge; the top-edge pill is
// for the agent tiles, which have no seat for one.
+#if UI_DESK_GRID
+ // The same rule the tab line keeps: everywhere you are inside a tab, which now includes the
+ // Overview and the desk. In the corner it collides with nothing, so the reasons it used to be
+ // hidden on those two — a top band it had to share — are gone with the seat.
+ bool show = n > 0 && !display_is_asleep() && lv_screen_active() == scr_projects
+ && !s_settings_active && !s_machines_active && !s_notif_open;
+#else
bool show = n > 0 && !display_is_asleep() && lv_screen_active() == scr_projects
&& !s_settings_active && !s_machines_active && !s_notif_open && !s_overview_active;
+#endif
set_hidden(s_notif_pill, !show);
if (show && s_notif_pill_lbl) { char b[8]; snprintf(b, sizeof b, "%d", n); lv_label_set_text(s_notif_pill_lbl, b); }
if (s_overview_bell_badge) {
diff --git a/devices/harness-device/firmware/scripts/upload-firmware.sh b/devices/harness-device/firmware/scripts/upload-firmware.sh
index f5f77e720..9efea1f3a 100755
--- a/devices/harness-device/firmware/scripts/upload-firmware.sh
+++ b/devices/harness-device/firmware/scripts/upload-firmware.sh
@@ -33,6 +33,20 @@ GCS_PUBLIC_BASE_URL="${GCS_PUBLIC_BASE_URL:-https://storage.googleapis.com/${GCS
METADATA_PATH="${METADATA_PATH:-harness/esp32/ota/metadata.json}"
OTA_KEY="${OTA_KEY:-commander}" # must match DEVICE_OTA_KEY in main/config_store.h
+# WHICH SILICON THIS RELEASE IS FOR, NAMED OUT LOUD.
+#
+# One project builds for two boards now, and this script builds into its own fresh directory — so
+# nothing in it says which. ESP-IDF then GUESSES, and what it guesses from is a stale `sdkconfig`
+# left in the firmware directory by whoever built last. On this desk that happened to say esp32s3
+# and the release looked fine; on a clean checkout, where no such file exists, IDF falls back to
+# plain `esp32` and the build dies at CMake (verified, 2026-09-28).
+#
+# Loud rather than silent, so this was never going to ship the wrong image — but it was going to
+# stop working the first time it ran anywhere but here, which for a release script is the same
+# problem one step later. The pair moves together: OTA_KEY names the manifest entry, and this names
+# the chip whose image goes in it.
+IDF_TARGET_BOARD="${IDF_TARGET_BOARD:-esp32s3}"
+
next_firmware_version() {
local current="$1" major minor patch
if [[ ! "$current" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
@@ -162,12 +176,12 @@ if [ "$DO_BUILD" -eq 1 ]; then
rm -f "$RELEASE_SDKCONFIG"
echo ">> building… (prod: -DDEVICE_FORCE_PROD=1, build dir $BUILD_DIR, fresh config from sdkconfig.defaults)"
BUILD_LOG="$(mktemp)"
- if ! idf.py -C "$HERE" -B "$BUILD_DIR" -DSDKCONFIG="$RELEASE_SDKCONFIG" -DDEVICE_FORCE_PROD=1 build 2>&1 | tee "$BUILD_LOG"; then
+ if ! idf.py -C "$HERE" -B "$BUILD_DIR" -DIDF_TARGET="$IDF_TARGET_BOARD" -DSDKCONFIG="$RELEASE_SDKCONFIG" -DDEVICE_FORCE_PROD=1 build 2>&1 | tee "$BUILD_LOG"; then
if grep -q "idf.py fullclean" "$BUILD_LOG"; then
echo ">> build env changed; running idf.py fullclean and retrying once"
idf.py -C "$HERE" -B "$BUILD_DIR" fullclean
rm -f "$RELEASE_SDKCONFIG"
- idf.py -C "$HERE" -B "$BUILD_DIR" -DSDKCONFIG="$RELEASE_SDKCONFIG" -DDEVICE_FORCE_PROD=1 build
+ idf.py -C "$HERE" -B "$BUILD_DIR" -DIDF_TARGET="$IDF_TARGET_BOARD" -DSDKCONFIG="$RELEASE_SDKCONFIG" -DDEVICE_FORCE_PROD=1 build
else
exit 1
fi
diff --git a/devices/harness-device/firmware/sdkconfig.defaults.esp32s3 b/devices/harness-device/firmware/sdkconfig.defaults.esp32s3
index d6592564c..7bc6fe2f0 100644
--- a/devices/harness-device/firmware/sdkconfig.defaults.esp32s3
+++ b/devices/harness-device/firmware/sdkconfig.defaults.esp32s3
@@ -3,8 +3,13 @@
# Split out of sdkconfig.defaults when the Pro's ESP32-P4 target arrived; the values are unchanged from
# what shipped, so a dial built before and after the split gets the same sdkconfig.
#
-# CONFIG_IDF_TARGET lives here rather than in the shared file so that `idf.py build` in a fresh
-# checkout still means "the dial" — ESP-IDF falls back to this when nothing else names a target.
+# CONFIG_IDF_TARGET lives here because this is the dial's file, and that is all it does.
+#
+# IT DOES NOT MAKE A TARGETLESS BUILD MEAN "THE DIAL", which an earlier version of this comment
+# claimed. ESP-IDF only reads sdkconfig.defaults.<target> once it already knows the target, so the
+# claim was circular: with no target named, IDF guesses from a stale `sdkconfig` if one is lying
+# around and falls back to plain `esp32` if not. Anything that builds this project says which board
+# it wants — the build dirs pass -DSDKCONFIG, and scripts/upload-firmware.sh pins -DIDF_TARGET.
CONFIG_IDF_TARGET="esp32s3"
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y