1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! Plain data types shared across the `app` module.
//!
//! Contains enums and structs with no dependency on [`super::state::App`].
//! They live here so the heavier modules can import them without pulling in
//! the full state machinery.
/// Which high-level panel currently owns keyboard focus.
/// One repo suggestion shown in the first-run wizard.
///
/// Built from the inbox on first launch when `config.repos` is empty.
/// Interaction mode for the repo picker overlay.
/// Which kind of item a detail fetch targets.
///
/// Passed to [`super::state::App::spawn_detail_fetch`] so a single generic supervisor task
/// can dispatch to either [`crate::github::Client::fetch_pr_detail`] or
/// [`crate::github::Client::fetch_issue_detail`].
/// Identifies the PR or issue the user had open in a given repo tab.
///
/// Persisted in [`crate::app::App::per_tab_state`] so that switching away from a tab and
/// returning to it restores the detail view the user was reading rather than
/// dumping them back on the dashboard list.
/// State snapshot for a single repo tab, captured when the user switches away
/// from that tab and replayed when they come back.
///
/// Only the *reference* (repo + number + kind) is stored here. The actual
/// payload lives in [`crate::app::App::detail_cache`] and is served with
/// stale-while-revalidate semantics on restore: a cache hit shows content
/// immediately while a background re-fetch runs when the entry is stale.
/// A cold miss (first visit or after manual `r` refresh) shows the existing
/// "Fetching…" spinner as before.