╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2355 raw_key; │ │2356 │ │2357 if (self.headerActive()) { │ │2165 - // down from the tabs re-enters the stack if the selected view has │ │2166 - // something to focus; other keys move the tabs. │ │2358 + // down from the sub-header re-enters the stack if the selected │ │2359 + // view has something to focus; enter in the search box submits │ │2360 + // the query; other keys move within the sub-header. │ │2361 if (inp.vertDirection(key) == .down) { │ │2362 const enterable = if (self.viewStack().getSelected()) |selected| switch (selected.*) {│ │2363 .tag_flow => |*tf| tf.text_boxes.items.len > 0, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2366 else => true, │ │2367 } else false; │ │2368 if (enterable) root_focus.setFocus(self.box.children.keys()[stack_index]);│ │2369 + } else if (key == .enter) { │ │2370 + if (try self.header().submittedText(allocator)) |text| { │ │2371 + defer allocator.free(text); │ │2372 + try self.submitSearch(text); │ │2373 + } │ │2374 } else { │ │2375 try self.header().input(allocator, key, root_focus); │ │2376 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2402 } │ │2403 } │ │2404 │ │2405 + // navigate to the typed query's results, keeping the tag filter and the │ │2406 + // status list the page shows. an empty box clears a filtered page and │ │2407 + // does nothing on any other one. │ │2408 + fn submitSearch(self: *This, text: []const u8) !void { │ │2409 + if (text.len == 0 and self.data.search == null) return; │ │2410 + const selected = self.header().getSelectedIndex() orelse 0; │ │2411 + const status: Status = if (selected < status_count) splitStatus(selected) else @enumFromInt(0);│ │2412 + const route = listRoute(self.data.identity, status, self.data.tag, "") orelse return; │ │2413 + try self.session.navigate(route.withSearch(text) orelse return); │ │2414 + } │ │2415 + │ │2416 // arrow keys move the tag selection; up from the top row crosses to the │ │2417 // header tabs. │ │2418 fn tagsViewInput(self: *This, key: Key, root_focus: *Focus) void { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯