╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Threads.zig│ ╰───────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2372 title_input.clear(allocator); │ │2373 tags_input.clear(allocator); │ │2374 description_input.clear(allocator); │ │2441 - const route = commentsRoute(self.data.identity, &event_id_hex, 0) orelse return; │ │2375 + const route = ui.RoutablePage.repoThreadCommentsRoute(kind, self.data.identity, &event_id_hex, 0) orelse return;│ │2376 try self.session.navigate(route); │ │2377 return; │ │2378 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │2411 try self.session.navigate(route); │ │2412 } │ │2413 │ │2480 - // re-emit the selected issue's event with the form's content (status │ │2481 - // preserved), then reload the issue's page. this is the terminal path; │ │2414 + // re-emit the selected thread's event with the form's content (status │ │2415 + // preserved), then reload the thread's page. this is the terminal path;│ │2416 // the web posts the form to the edit route. │ │2417 fn submitEditedThread(self: *This, allocator: std.mem.Allocator) !void {│ │2418 if (comptime wasm) return; │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │2486 try self.session.navigate(route); │ │2487 } │ │2488 │ │2555 - // flip the shown issue's status by re-emitting its event, then reload the │ │2556 - // page rooted at the issue so the view reflects the change. this is the │ │2489 + // flip the shown thread's status by re-emitting its event, then reload the │ │2490 + // page rooted at the thread so the view reflects the change. this is the │ │2491 // terminal path; the web posts the button's form to the status route. │ │2492 fn toggleStatus(self: *This, allocator: std.mem.Allocator, index: usize) !void {│ │2493 if (comptime !has_status) return; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │2498 const entry = self.window(index).items[sel]; │ │2499 const author = (try self.session.eventAuthor()) orelse return; │ │2500 │ │2567 - const status = toggledStatus(entryStatus(entry)) orelse return; │ │2501 + const status = (statusChange(entryStatus(entry)) orelse return).status;│ │2502 │ │2503 const id_bytes = try evt.parseEventId(entry.id); │ │2504 │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2518 │ │2519 // arrow keys move the tag selection; at the flow's edges focus crosses to │ │2520 // the neighboring widgets. │ │2587 - fn tagsInput(self: *This, index: usize, key: Key, root_focus: *Focus) !void { │ │2588 - const tf = self.tagFlow(index) orelse return; │ │2521 + fn tagsInput(self: *This, index: usize, child_index: usize, tf: *ui.TagFlow, key: Key, root_focus: *Focus) void {│ │2522 const cid = tf.focus.child_id orelse return; │ │2523 const cur = tf.indexOfFocusId(cid) orelse return; │ │2524 const count = tf.text_boxes.items.len; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2525 switch (key) { │ │2593 - .arrow_left => if (cur > 0) self.focusTag(index, tf, root_focus, cur - 1) else try self.focusList(index, root_focus), │ │2594 - .arrow_right => if (cur + 1 < count) self.focusTag(index, tf, root_focus, cur + 1), │ │2526 + .arrow_left => if (cur > 0) self.focusTag(index, child_index, tf, root_focus, cur - 1) else self.focusList(index, root_focus),│ │2527 + .arrow_right => if (cur + 1 < count) self.focusTag(index, child_index, tf, root_focus, cur + 1), │ │2528 .arrow_up => if (tf.rowStep(cur, false)) |i| { │ │2596 - self.focusTag(index, tf, root_focus, i); │ │2529 + self.focusTag(index, child_index, tf, root_focus, i); │ │2530 } else { │ │2531 _ = self.moveDetailVertical(index, root_focus, false); │ │2532 }, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │2533 .arrow_down => if (tf.rowStep(cur, true)) |i| { │ │2601 - self.focusTag(index, tf, root_focus, i); │ │2534 + self.focusTag(index, child_index, tf, root_focus, i);│ │2535 } else { │ │2536 _ = self.moveDetailVertical(index, root_focus, true);│ │2537 }, │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │2605 - .home => self.focusTag(index, tf, root_focus, 0), │ │2606 - .end => self.focusTag(index, tf, root_focus, count - 1), │ │2538 + .home => self.focusTag(index, child_index, tf, root_focus, 0), │ │2539 + .end => self.focusTag(index, child_index, tf, root_focus, count - 1),│ │2540 else => {}, │ │2541 } │ │2542 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │2543 │ │2544 const title_child_index: usize = 0; │ │2612 - const tags_child_index: usize = 2; │ │2545 │ │2546 // the tool row's first child after the spacer that pushes it right│ │2547 const first_in_row_index: usize = 1; │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2616 - │ │2617 - fn tagFlow(self: *This, index: usize) ?*ui.TagFlow { │ │2618 - const inner = self.detailInner(index); │ │2619 - if (inner.children.count() <= tags_child_index) return null; │ │2620 - return switch (inner.children.values()[tags_child_index].widget) { │ │2621 - .tag_flow => |*tf| tf, │ │2622 - else => null, │ │2623 - }; │ │2624 - } │ │2548 │ │2626 - fn tagsFocused(self: *This, index: usize) bool { │ │2627 - const inner = self.detailInner(index); │ │2628 - const cid = inner.getFocus().child_id orelse return false; │ │2629 - return inner.children.getIndex(cid) == tags_child_index and self.tagFlow(index) != null;│ │2630 - } │ │2631 - │ │2549 fn toolRowFocused(self: *This, index: usize) bool { │ │2550 const outer = self.detailOuter(index); │ │2551 const cid = outer.getFocus().child_id orelse return false; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯