╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │71 } │ │72 │ │73 var self = View{ .box = box, .data = data, .tab_ids = tab_ids }; │ │74 - // when a previous login attempt just failed, land on the auth tab so │ │75 - // the user sees the form (with its "(invalid)" label) instead of the │ │76 - // default users list — otherwise the post-redirect page reads as if │ │77 - // the login silently succeeded. │ │78 - self.getFocus().child_id = if (session.data.login_failure != null) │ │79 - tab_ids[auth_tab_index] │ │80 - else │ │81 - tab_ids[0]; │ │74 + // initial selected tab follows session.data.current_page — the web │ │75 + // layer decides this from the request URL, the TTY uses whatever │ │76 + // the session arrives with — so we don't bake a default here. │ │77 + self.getFocus().child_id = tab_ids[switch (session.data.current_page) {│ │78 + .home_users => 0, │ │79 + .home_repos => 1, │ │80 + .home_auth => 2, │ │81 + }]; │ │82 return self; │ │83 } │ │84 │ ╰───────────────────────────────────────────────────────────────────────────────────╯