For developers · App internals
Counters
On this page
Every counter in Gitoodo shows a value of one Counts value, computed in Rust
(crates/core/src/sync/counts.rs, SyncHub::counts in src-tauri/src/sync.rs). The webview
never counts on its own; it reads get_counts once and follows the counts event.
| Counter | Value |
|---|---|
| Tray title and tooltip | total |
| Tab "Fragen" | total |
| Heading "Fragen" | questions |
| Overview "Braucht dich" | questions |
total = questions, so the single tab shows the tray number. There is no inbox of forge
notifications any more (#189): Gitoodo never fetches or marks forge notifications, and only
questions are counted. The header
shows no count (#84): each number appears once, on its tab.
Tray and webview are updated from the same Counts in the same call (publish_counts), after
every poll, after answering or commenting, and after removing
an account.
Rule#
- Questions: open entries of all "waiting for me" views that count in the tray, over all
accounts, minus questions answered through the app (answer card or free comment) whose
waiting_sinceis not newer than the posted comment. Such an answer is dropped at the next poll once the question has left the list or waits again. The popover shows the same questions teal ("handled"). - Overview (#237): lists no questions; "Braucht dich" shows
questionsand leads to "Fragen an mich". Repo rows with an open question (same rule) carry a mark without a number. No overview filter changes that number. - Disabled repos (#135): items of repos switched off in the settings are in no list, no counter,
no unseen mark and no system notification. They are dropped centrally (
without_disabled, read bySyncHub::tallyand the snapshot events), so switching a repo off updates tray and lists at once; switching it on shows its items again (after the next sync for what the poll skipped). - List filters (search, repo, kind, status; #61) never change any counter. They narrow what a list shows, not what waits; otherwise the tray (which knows no filters) and the popover would disagree. Under an active filter only the head of the view says "shown of total" (e.g. "3 of 12 questions are waiting for you", #109); without a filter it shows the total.
- A failing account keeps its last good entries, so its counts stay stable until the next successful poll.
- Paging: every list request follows the forge's
Linkheader (collect_pages), so counts are not capped at one page of 50.
Seen and unseen#
Every counted item (open question) is either seen or unseen
(crates/core/src/store/viewed.rs, unseen_keys in counts.rs).
- Seen means the item was visible in the opened list: its row stayed at least 60 % in view
for about 0.7 s while the window was focused and visible. The webview only reports the keys
(
mark_seen); Rust looks up the item's activity time and stores it as the mark. - New activity makes it unseen again: a question whose
waiting_sinceis newer than its mark is unseen. Answered (handled) questions are never unseen. - Snooze (
snooze_question,unsnooze_question): a snoozed question leaves the list, the counters and the unseen marks until its wake-up time (presets: 1 hour, tomorrow 09:00 local, 1 week; computed insrc/state/snooze.ts). It returns by itself at that time (timer plus every poll), without restart. New activity on the issue does not wake it early. Stored per account inviewed.json(snoozed, unix seconds); expired or vanished entries are pruned on the next poll. - Tray: one unseen item turns the tray check red (macOS and Windows); the tooltip names how
many, e.g. "Gitoodo (3, 1 unseen)".
Counts.unseencarries the number. - Lists: unseen rows carry a small neutral ink dot (6 px) and a hidden "Neu"/"New" for screen readers, never red. A dot stays while the user looks at the list and is gone once the window loses focus, so it never vanishes under the user's eyes.
- Persistence: marks live in
viewed.jsonnext to the settings and survive restarts. Marks of items that left the lists are dropped at the next poll; a removed account is forgotten. - Local only:
viewed.jsonis not part of the settings export and is never sent anywhere.
System notifications#
A system notification appears only for a new hit of a "waiting for me" view that counts in the
tray (assignment and labels as set in the criteria editor, #143). A plain new issue that no
counting view matches never notifies, neither does a hit in a view that does not count, and an
item in two counting views notifies exactly once (the hits are de-duplicated by repo and
number in fetch_account). The first poll after a start is the baseline and notifies nothing.
Covered by the tests in crates/core/src/sync/fetch.rs.