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
Dial: the agent tile goes back to [mark][Model] over a plain name
0xdiego253c39063e17f7
diff --git a/device/esp32-circle/main/ui/touch.c b/device/esp32-circle/main/ui/touch.cindex ab43a1c1f..4579d4413 100644--- a/device/esp32-circle/main/ui/touch.c+++ b/device/esp32-circle/main/ui/touch.c@@ -298,7 +298,7 @@ static void touch_read(lv_indev_t *indev, lv_indev_data_t *data)// that leaves the screen could never be pressed. A modal chooser also has no business// offering a pull-to-notifications on top of itself.ndrag = !display_is_asleep() && !ui_reader_is_open() && !ui_switch_is_open() &&- !ui_picker_is_open() &&+ !ui_picker_is_open() && !ui_notif_pill_hit(x, y) &&(ui_notif_is_open() || y < ui_notif_pull_zone_px());ndy0 = ndyl = y; ncap = ndrag;} else if (pressed && ndrag) {@@ -306,13 +306,12 @@ static void touch_read(lv_indev_t *indev, lv_indev_data_t *data)} else if (!pressed && nprev && ndrag) { // release of a captured gestureint d = ndyl - ndy0;if (ui_notif_is_open()) { if (d < -SWIPE_MIN_PX) ui_notif_swipe_up(); } // up → close (only if list at top)- // Pull down from the top → the NOTIFICATIONS (owner, 2026-09-14). The gesture opened the- // agent switcher for a while; the switcher is retired from the glass now that the carousel- // walks the window's swarm and the swarm line above the name picks between swarms, so the- // pull-down goes back to the list it first opened. A TAP in the band opens the same list —- // the bell is a button, but this band swallows every press that starts inside it, and the- // bell sits INSIDE it.- else if (d > SWIPE_MIN_PX || (d > -SWIPE_MIN_PX && d < SWIPE_MIN_PX)) ui_notif_open();+ // Pull down from the top → the AGENT LIST (owner, 2026-09-15: "vuốt xuống hiển thị danh+ // sách agent như cũ"). The notifications are the bell's alone now: the bell is a button,+ // and a press that starts ON it is handed to LVGL rather than captured by this band — see+ // the capture test above — so a tap on the bell opens the drawer and a tap anywhere else+ // in the band does nothing.+ else if (d > SWIPE_MIN_PX) ui_switch_open();ndrag = false; ncap = true;}nprev = pressed;diff --git a/device/esp32-circle/main/ui/ui_screens.c b/device/esp32-circle/main/ui/ui_screens.cindex 8dde4f79b..80519831d 100644--- a/device/esp32-circle/main/ui/ui_screens.c+++ b/device/esp32-circle/main/ui/ui_screens.c@@ -3810,10 +3810,7 @@ static void parse_and_store(proj_t *p)#define CTL_CHIP_PAD_V 6#define CTL_CHIP_GAP 13 // between pills (10 → 13: the row sits lower now, so there is room)#define CTL_MARK_SRC 20 // every engine icon asset is 20x20-#define SHELL_MARK 28 // the mark beside the name: 0.72 of a 38px name, rounded-#define SHELL_MARK_GAP 10 // between the mark and the first letter-static void swarm_line_tap(lv_event_t *e); // the swarm line → the swarm picker (defined with it)-static void swarm_line_paint(proj_t *p); // name the selected swarm on this tile, or hide the line+static void swarm_line_paint(proj_t *p); // no line to paint any more — see build_shell; kept for ui_swarms_replace// Chip row BOTTOM → agent name top.//// ⚠️ THIS AND TILE_PAD_TOP MOVE TOGETHER. The row FLOATS off the header, so its screen position is@@ -3876,7 +3873,7 @@ static void header_ext_draw_cb(lv_event_t *e)// picker is one build_shell call from being back.//// A small glass-pill chip for the per-agent controls row (Model / Effort). Clickable → opens a picker.-static __attribute__((unused)) lv_obj_t *ctl_chip(lv_obj_t *parent, lv_event_cb_t cb)+static lv_obj_t *ctl_chip(lv_obj_t *parent, lv_event_cb_t cb){lv_obj_t *c = lv_label_create(parent);lv_obj_set_style_text_font(c, CTL_CHIP_FONT, 0);@@ -4010,8 +4007,8 @@ static void request_picker(int want)ui_show_picker_loading(want);s_req_models = true;}-static __attribute__((unused)) void model_chip_tap(lv_event_t *e) { (void)e; request_picker(PICK_MODE_MODEL); }-static __attribute__((unused)) void effort_chip_tap(lv_event_t *e) { (void)e; request_picker(PICK_MODE_EFFORT); }+static void model_chip_tap(lv_event_t *e) { (void)e; request_picker(PICK_MODE_MODEL); }+static void effort_chip_tap(lv_event_t *e) { (void)e; request_picker(PICK_MODE_EFFORT); }@@ -4506,24 +4503,11 @@ static void create_tile(proj_t *p)// rebuild correctly after free_content deletes the tile outside the active window.// Engine badge = product mark. Claude is a recolored monochrome mask; other marks retain the exact// colors from the same vendored assets used by the web app.-// Size the name to its text, capped at what the mark leaves of the row. The header is a flex row-// centred as a unit, so the mark sits one gap from the first letter whatever the name's length; a box-// the width of the row would put the mark at the row's left edge and the name in the middle of what was-// left, and the two would read as unrelated. LONG_DOT needs a real width to elide against, which is why-// the text is measured rather than left to LV_SIZE_CONTENT.-static void shell_name_fit(proj_t *p)-{- if (!p->name_lbl) return;- bool mark = p->engine_lbl && !lv_obj_has_flag(p->engine_lbl, LV_OBJ_FLAG_HIDDEN);- int32_t cap = SAFE_CONTENT_W - (mark ? SHELL_MARK + SHELL_MARK_GAP : 0);- lv_point_t sz;- lv_text_get_size(&sz, lv_label_get_text(p->name_lbl), &geist_med_38, 0, 0, LV_COORD_MAX, LV_TEXT_FLAG_NONE);- lv_obj_set_width(p->name_lbl, sz.x < cap ? sz.x : cap);-}-+// Engine badge = product mark. Claude is a recolored monochrome mask; other marks retain the exact+// colors from the same vendored assets used by the web app.static void apply_engine_label(proj_t *p){- if (!p->engine_lbl || !p->name_lbl) return;+ if (!p->engine_lbl || !p->engine_text_lbl) return;const lv_image_dsc_t *src = NULL;bool recolor = false;if (!strcmp(p->engine, "claude")) { src = &icon_claude; recolor = true; }@@ -4540,15 +4524,17 @@ static void apply_engine_label(proj_t *p)else if (!strcmp(p->engine, "grok")) { src = &icon_grok; }else if (!strcmp(p->engine, "agy")) { src = &icon_agy; }else if (!strcmp(p->engine, "copilot")) { src = &icon_copilot; }- if (p->engine_text_lbl) lv_obj_add_flag(p->engine_text_lbl, LV_OBJ_FLAG_HIDDEN); // product-mark path only+ lv_obj_add_flag(p->engine_text_lbl, LV_OBJ_FLAG_HIDDEN); // product-mark path onlyif (src) {lv_image_set_src(p->engine_lbl, src);- // Box = the mark's own square, artwork CENTRED inside it. It sits beside the name now, at- // SHELL_MARK px — 0.72 of the name's size, the ratio the launch-page prototype draws the pair at.+ // Box = exactly one pill, artwork CENTRED inside it. Sizing the box to the zoomed bitmap instead+ // left it a pixel or two off the pills (integer rounding in the scale), and the row's flex centring+ // then split that difference — the mark read as sitting high next to the boxes. Pinning the box to+ // the pill height makes the row one band by construction, whatever the font or padding become.lv_image_set_inner_align(p->engine_lbl, LV_IMAGE_ALIGN_CENTER);lv_image_set_pivot(p->engine_lbl, (int32_t)src->header.w / 2, (int32_t)src->header.h / 2);- lv_image_set_scale(p->engine_lbl, (uint32_t)(SHELL_MARK * 256 / CTL_MARK_SRC));- lv_obj_set_size(p->engine_lbl, SHELL_MARK, SHELL_MARK);+ lv_image_set_scale(p->engine_lbl, (uint32_t)ctl_mark_scale());+ lv_obj_set_size(p->engine_lbl, ctl_pill_h(), ctl_pill_h());lv_obj_set_style_image_recolor(p->engine_lbl, COL_CLAUDE, 0);// Reset this on every engine change: the same LVGL image object may previously have shown Claude.lv_obj_set_style_image_recolor_opa(p->engine_lbl, recolor ? LV_OPA_COVER : LV_OPA_TRANSP, 0);@@ -4556,86 +4542,83 @@ static void apply_engine_label(proj_t *p)} else {lv_obj_add_flag(p->engine_lbl, LV_OBJ_FLAG_HIDDEN);}- shell_name_fit(p);}// THE MACHINE LINE IS GONE from the agent tile (mockup/recap-done.html): the same fact is already on the-// Overview eyebrow and on the switcher's second line, and here it was repeated under every single tile,-// 25px tall, for a fact that does not change while you are reading it. The model keeps `machine` /-// `machine_id` — the switcher, the notifications and the ring all read them; only the line is gone.+// Overview eyebrow and on the switcher's second line. THE HEADER'S HEIGHT IS THE TILE'S LAYOUT: it is a+// flex child of the tile, so its height is exactly what the "Done" block below it is pushed down by.//-// THE HEADER'S HEIGHT IS THE TILE'S LAYOUT. It is a flex child of the tile, so its height is exactly what-// the "Done" block below it is pushed down by. One line of name, set once in build_shell.--+// The swarm line that sat in the chip band for a day is gone with the concept (owner, 2026-09-15: "không+// còn khái niệm swarm nữa"): the band is the [mark][Model] row again, as it was before.static void build_shell(proj_t *p){if (!p->tile || p->header) return; // no tile, or shell already builtp->dot = NULL; // recap design drops the status dot (its only reader is guarded)- // The header is ONE ROW: [engine mark] [name], centred as a pair (owner, 2026-09-14). The mark used to- // lead the chip row floating above the name; that row is the swarm line now (below), and the mark- // moved down beside the word it identifies, at 0.72 of the name's size and one gap from its first- // letter — see shell_name_fit for why the name is measured rather than boxed.+ // Keep name + engine as ONE top-level tile child. The engine line consumes space from the old 24px+ // name→body gap, so adding it does not push the recap card down or affect the round-screen margins.p->header = lv_obj_create(p->tile);lv_obj_remove_style_all(p->header);lv_obj_clear_flag(p->header, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE);+ // One line, always: the name. See the note above the header height.lv_obj_set_size(p->header, SAFE_CONTENT_W, lv_font_get_line_height(&geist_med_38));- lv_obj_set_flex_flow(p->header, LV_FLEX_FLOW_ROW);- lv_obj_set_flex_align(p->header, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);- lv_obj_set_style_pad_column(p->header, SHELL_MARK_GAP, 0);+ lv_obj_set_flex_flow(p->header, LV_FLEX_FLOW_COLUMN);+ lv_obj_set_flex_align(p->header, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);+- p->engine_lbl = lv_image_create(p->header); // engine product mark, sized by apply_engine_label- p->engine_text_lbl = NULL; // the text fallback went with the chip rowp->name_lbl = lv_label_create(p->header);lv_obj_set_style_text_color(p->name_lbl, COL_FG, 0);lv_obj_set_style_text_font(p->name_lbl, &geist_med_38, 0); // agent name — Medium for emphasis+ lv_obj_set_size(p->name_lbl, SAFE_CONTENT_W, lv_font_get_line_height(&geist_med_38));lv_obj_set_style_text_align(p->name_lbl, LV_TEXT_ALIGN_CENTER, 0);lv_label_set_long_mode(p->name_lbl, LV_LABEL_LONG_DOT);lv_label_set_text(p->name_lbl, p->name[0] ? p->name : "\xE2\x80\xA6"); // model name, or "…" placeholder- // THE SWARM LINE, floating in the band above the name where the [mark][Model][Effort] chips were- // (owner, 2026-09-14: "bỏ luôn line chip, thay = line swarms"). It names the swarm the window has- // on screen — the tab whose panes this carousel walks — and a tap opens the list of the others.- // Hidden when the daemon has sent no swarms: no window, no tabs, nothing to name.++ // Per-agent controls row FLOATING in the band ABOVE the name: [Engine] [Model] [Effort] pills, one style.+ // Remote machines only; a tap opens the model/effort picker. The notif pull-down zone was narrowed to+ // y<44 (touch.c) so taps here still reach LVGL.//- // Parented to the HEADER, not the tile, for the reason the chip row was: a FLOATING child is placed- // from its parent's top pad, and the tile's changes between the idle and working layouts. Only- // IN-parent aligns survive a re-layout, so this stays TOP_MID with a negative offset.+ // Parented to the HEADER, not the tile, so it tracks the name. A FLOATING child is positioned at+ // parent->coords.y1 + parent's top pad + offset, so hanging it off the tile pinned it to the tile's+ // pad_top — which the working state sets to 0, throwing the row ~48px off the top of the screen. The+ // header has no padding and flex moves it in both states, so anchoring here lands the row exactly one+ // CTL_NAME_GAP above the name whatever the state. Idle is unchanged: the row still sits at+ // TILE_PAD_TOP - (pill + gap). Only IN-parent aligns survive a re-layout (lv_obj_pos.c falls through+ // to `default:` for every LV_ALIGN_OUT_*), so this must stay TOP_MID with a negative offset.lv_obj_add_flag(p->header, LV_OBJ_FLAG_OVERFLOW_VISIBLE); // the row hangs above the header's boxlv_obj_add_event_cb(p->header, header_ext_draw_cb, LV_EVENT_REFR_EXT_DRAW_SIZE, NULL); // …and stays tappable- // The same glass pill the Model chip wore (ctl_chip): dark fill, hairline border, full radius — the- // owner asked for the line to read as that button, not as bare text.- lv_obj_t *ctl = lv_button_create(p->header);+ lv_obj_t *ctl = lv_obj_create(p->header);lv_obj_remove_style_all(ctl);- lv_obj_set_size(ctl, LV_SIZE_CONTENT, ctl_pill_h());- lv_obj_set_style_pad_hor(ctl, CTL_CHIP_PAD_H, 0);- lv_obj_set_style_radius(ctl, LV_RADIUS_CIRCLE, 0);- lv_obj_set_style_bg_color(ctl, lv_color_hex(0x1c1e24), 0);- lv_obj_set_style_bg_opa(ctl, LV_OPA_70, 0);- lv_obj_set_style_bg_opa(ctl, LV_OPA_COVER, LV_STATE_PRESSED);- lv_obj_set_style_border_width(ctl, 1, 0);- lv_obj_set_style_border_color(ctl, lv_color_hex(0x3a3f4b), 0);- lv_obj_set_ext_click_area(ctl, 12); // forgiving tap target, as the chip had+ lv_obj_set_size(ctl, LV_SIZE_CONTENT, LV_SIZE_CONTENT);lv_obj_set_flex_flow(ctl, LV_FLEX_FLOW_ROW);lv_obj_set_flex_align(ctl, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);- lv_obj_set_style_pad_column(ctl, 8, 0);- lv_obj_clear_flag(ctl, LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_GESTURE_BUBBLE);+ lv_obj_set_style_pad_column(ctl, CTL_CHIP_GAP, 0);+ lv_obj_clear_flag(ctl, LV_OBJ_FLAG_SCROLLABLE);lv_obj_add_flag(ctl, LV_OBJ_FLAG_FLOATING);lv_obj_align(ctl, LV_ALIGN_TOP_MID, 0, ctl_row_y());- lv_obj_add_event_cb(ctl, swarm_line_tap, LV_EVENT_CLICKED, NULL);- p->swarm_lbl = lv_label_create(ctl);- lv_obj_set_style_text_font(p->swarm_lbl, CTL_CHIP_FONT, 0); // the chip's own face and colour- lv_obj_set_style_text_color(p->swarm_lbl, COL_FG, 0);- lv_obj_set_style_max_width(p->swarm_lbl, 260, 0);- lv_label_set_long_mode(p->swarm_lbl, LV_LABEL_LONG_DOT);- // No ▾ after the name: the pill IS the affordance, as the Model chip was.- p->model_lbl = NULL; // the Model / Effort chips are gone from the tile; their painters accept NULL- p->effort_lbl = NULL;- p->ctl_row = ctl;+ p->engine_lbl = lv_image_create(ctl); // engine product mark+ p->engine_text_lbl = lv_label_create(ctl); // retained as a hidden compatibility fallback+ lv_obj_set_size(p->engine_text_lbl, ctl_pill_h(), ctl_pill_h()); // fallback badge matches the pills too+ lv_obj_set_style_text_font(p->engine_text_lbl, CTL_CHIP_FONT, 0);+ lv_obj_set_style_text_align(p->engine_text_lbl, LV_TEXT_ALIGN_CENTER, 0);+ p->model_lbl = ctl_chip(ctl, model_chip_tap); // Model → opens the model picker+ // EFFORT IS OFF THE TILE (mockup/recap-done.html): it is a thing you set BEFORE a turn runs, and this+ // screen is what you read AFTER one finished. Everything behind it — the wheel, the picker mode, the+ // agent_update it sends — is untouched and one flip of this switch away.+ p->effort_lbl = AGENT_EFFORT_CHIP ? ctl_chip(ctl, effort_chip_tap) : NULL;apply_engine_label(p);- swarm_line_paint(p);+ model_chip_paint(p);+ effort_chip_paint(p);+ p->ctl_row = ctl;+ // The machine on the cable carries a runtime model and effort, so the row applies.+ //+ // TAPPABLE, unlike the first cable machine this firmware served. Back then the picker's catalog came+ // from a backend RPC the cable had no socket for, so an open picker could never populate and the+ // chips were deliberately inert. The daemon answers `models.list` over the wire now, so the screen+ // fills — and a chip you cannot tap is a control that lies about being one.+ if (!AGENT_CTL_CHIPS) lv_obj_add_flag(ctl, LV_OBJ_FLAG_HIDDEN);}@@ -4730,7 +4713,13 @@ static void update_content_window(void)int machines_col = cc, machines_best = CONTENT_WINDOW + 1;int noagents_col = cc, noagents_best = CONTENT_WINDOW + 1;int overview_col = cc, overview_best = CONTENT_WINDOW + 1;- for (int dc = -CONTENT_WINDOW; dc <= CONTENT_WINDOW; dc++) {+ // OUTSIDE IN, so the centre column is placed LAST. On a ring shorter than the window — one pane, or+ // two — the same agent owns more than one window column, and one tile can only sit at one of them.+ // Walked left to right, the last write put the single tile at cc+1: one column right of the glass,+ // and the screen was black with the Voice button floating on it (owner, 2026-09-15).+ static const int ORDER[] = { -CONTENT_WINDOW, CONTENT_WINDOW, 0 };+ for (int oi = 0; oi < (int)(sizeof(ORDER) / sizeof(ORDER[0])); oi++) {+ int dc = ORDER[oi];int col = cc + dc;int r = ring_of_col(col);int ad = dc < 0 ? -dc : dc;@@ -5139,7 +5128,7 @@ void ui_project_set_name(const char *project_id, const char *name)char clipped[80];name_clip(filtered, clipped, sizeof(clipped));snprintf(s_proj[i].name, sizeof s_proj[i].name, "%s", clipped); // MODEL: source of truth- if (s_proj[i].name_lbl) { lv_label_set_text(s_proj[i].name_lbl, clipped); shell_name_fit(&s_proj[i]); } // VIEW mirrors model (may be NULL when off-window)+ if (s_proj[i].name_lbl) lv_label_set_text(s_proj[i].name_lbl, clipped); // VIEW mirrors model (may be NULL when off-window)}display_unlock();}@@ -5862,15 +5851,7 @@ void ui_switch_open(void)// the screen here. Nothing is written optimistically: the line names what the window shows, not what// was asked for, the same rule the machine wheel's ✓ follows.-static void swarm_line_paint(proj_t *p)-{- if (!p || !p->ctl_row || !p->swarm_lbl) return;- const cable_swarm_t *sel = NULL;- for (int i = 0; i < s_swarm_count; i++) if (strcmp(s_swarms[i].id, s_swarm_selected) == 0) { sel = &s_swarms[i]; break; }- if (!sel) { lv_obj_add_flag(p->ctl_row, LV_OBJ_FLAG_HIDDEN); return; }- lv_label_set_text(p->swarm_lbl, sel->name[0] ? sel->name : "New swarm");- lv_obj_clear_flag(p->ctl_row, LV_OBJ_FLAG_HIDDEN);-}+static void swarm_line_paint(proj_t *p) { (void)p; } // the line left the face with the concept// Every live tile: the line is per-tile LVGL, the fact is global.static void swarm_lines_repaint(void)@@ -5995,7 +5976,7 @@ static void swarm_picker_build(void)}// The swarm line on a tile was tapped. Runs on the LVGL task under its own lock.-static void swarm_line_tap(lv_event_t *e)+static __attribute__((unused)) void swarm_line_tap(lv_event_t *e){(void)e;s_suppress_tap = true; // this press was the line's — not a tap on the tile behind it@@ -6011,6 +5992,13 @@ static void swarm_line_tap(lv_event_t *e)ESP_LOGI(TAG, "swarm picker: %d swarms", s_swarm_count);}+bool ui_notif_pill_hit(uint16_t x, uint16_t y)+{+ if (!s_notif_pill || lv_obj_has_flag(s_notif_pill, LV_OBJ_FLAG_HIDDEN)) return false;+ lv_point_t pt = { .x = x, .y = y };+ return lv_obj_hit_test(s_notif_pill, &pt);+}+void ui_notif_open(void){if (!s_notif_drawer || s_notif_open) return;diff --git a/device/esp32-circle/main/ui/ui_screens.h b/device/esp32-circle/main/ui/ui_screens.hindex 18272b9fb..96f7d1af7 100644--- a/device/esp32-circle/main/ui/ui_screens.h+++ b/device/esp32-circle/main/ui/ui_screens.h@@ -161,6 +161,9 @@ bool ui_switch_is_open(void);void ui_switch_open(void);void ui_notif_close(void);bool ui_notif_is_open(void);+// True when a press lands on the bell pill. touch.c asks before capturing the top band, so the one+// button that lives inside that band can be pressed — the drawer opens from the bell and nowhere else.+bool ui_notif_pill_hit(uint16_t x, uint16_t y);// A swipe-up inside the open drawer → close it, but only if the list is already scrolled to the top// (otherwise the gesture is just scrolling the list).void ui_notif_swipe_up(void);