For developers · App internals
Start: first paint and loading state
On this page
The window is never empty after a start. It shows the last known state at once and replaces it part by part as the accounts and repositories answer. "Synced" only shows once every account has answered.
Where the window opens#
The window opens on the start page: the statistics overview (src/views/overview/OverviewView.tsx,
docs/metrics.md, "Overview dashboard"), with what only the user can fix above the figures. The
way back to it from anywhere is the first entry of the navigation, "Überblick" ("Overview", key
1), marked like every entry while the start page shows. The header shows the same full wordmark on
every view, never a view title (each view names itself in its own heading), so the top of the
window does not change when a repository or a page opens. The wordmark is a second way to the
start page: a button named "Gitoodo, zum Überblick" ("Gitoodo, go to the overview"), reachable
with Tab and pressed with Enter or Space. The introduction tour points at the navigation entry.
What the next start opens (src/state/lastView.ts, kept in the window's local storage, never in
start-view.json):
| Before the window closed | Next start |
|---|---|
| Nothing kept (first start, private mode, damaged entry) | The start page. |
| The start page, a tab ("All repos", "Asked of me", Chat) | The start page. |
| A repository's page, or a question or the settings opened on it | That repository's page; Back leads to the start page. |
| A repository that is gone since | The start page. |
| The onboarding handed over to the setup assistant | The setup assistant over the start page. |
Why not the tab of earlier: the start page answers "is everything running?" in one look, which is the question at every start, and a list from earlier can have changed meanwhile. A repository is the exception: whoever closed the window inside one was in the middle of its work. "All repos" keeps its subpage, so the tab shows the page used last. A kept "Overview" subpage of earlier versions opens the start page.
The view from earlier#
- What is stored: a compact copy of what the window showed: the accounts (id, kind, label, address, login), each account's last good snapshot (questions and tasks, dashboard rows, repo list), the orchestrator's repositories (state and issues), the counts and the release planning's last report (#1694, the release plan and overview of the accounts still known). The releases keep the time they were read: a session that never opens the release view stores the ones from earlier again, with their old time, not as new. Errors are not stored; they belong to the moment.
- Where it lives:
start-view.jsonin the app's state folder (the folder that also holdssettings.json). It is local only: it is not part of the settings export, and it is never sent anywhere. - Who writes it: the window composes the view (
src/state/startView.ts). The core stores it (crates/core/src/store/start_view.rs):- fields whose names suggest a secret (
token,password,secret,cookie,credential,authorization,api_key,private_key,auth) are dropped; - every text passes the log redaction: registered tokens, token prefixes and URL credentials are replaced;
- the file stays under 4 MiB. A bigger view first loses issue bodies and comments, and a view that is still too big is not stored at all.
- fields whose names suggest a secret (
- When it is written: at most every 3 seconds while the window shows data that arrived since the start. The view from earlier alone is never stored again.
- Version: a view with another version, or a damaged one, is ignored whole, never shown in part. The next save replaces it.
Figures of the start page (#1659)#
The start page's statistics come from reads of their own, not from the sync. So that the page
does not start empty on every visit, it shows the figures of its last visit at once and lets a
fresh read replace them in the background (src/state/pageCache.ts, keys and checks in
src/views/overview/cachedFigures.ts):
| Figure | Kept for | Where |
|---|---|---|
| Daily activity (tiles, today strip, bars, heat map) | each scope: repos shown, days asked | memory and the window's local storage |
| Queue waiting time | the week starts asked | memory and the window's local storage |
| App mode and dispatcher status (slots, usage) | the running window | memory only |
- Per scope: an entry belongs to its repos and days, so figures of other filters or of yesterday never show; a new day reads anew. Activity is kept only from a read that is through (no repo still being read), so part of the repos never shows as too low figures. Up to six scopes per page are kept, the most recent ones.
- Only counts: the activity is kept without the read's progress (which names repos that failed), the queue waits only from a running dispatcher. The key names the repos in scope, as the kept last view does; no token, no forge text.
- Damaged or old: a store of another version, or an entry of a shape the page does not accept, is dropped without a message and read anew.
- Errors: a fresh read that fails shows its error as before; the kept figures are not kept on screen in its place.
What the window shows while loading#
| Part | Not known yet | From earlier |
|---|---|---|
| Sidebar | Shimmering placeholder rows; at the foot while an account's repositories are not listed | Rows as before; "As of 14:32" next to the heading (the hover explains it); "from earlier" in the row's tooltip |
| Repository row | A short shimmering bar where its state will show; "loading" in its label and tooltip | Its last state |
| Group or owner | No count, and a placeholder instead of "Empty. Drag repositories here…" | Its count from earlier |
| Questions | The skeleton; once some arrived, shimmering rows under the list | The questions from earlier; "As of 14:32" behind the heading |
| Counters | An empty shimmering pill, never "0" | The counts from earlier |
| Status bar | "Loading repositories …", or "Loading 12 of 34 repositories …" once the totals are known | Same |
| Releases | The loading line, or "busy" while the classifier's first poll runs | The releases from earlier; "As of 14:32" in the place of the poll time (the hover explains it) |
Rules:
- "As of HH:MM": wherever data from earlier shows (sidebar, questions, releases), the label
names when it was read, in local time; before today with the day, in another year with the
year (
formatEarlier). The sidebar and questions take the time the view was saved, the releases their own read time. The label goes as soon as fresh data replaces it: for the releases, the session's first report that shows something (an error keeps them in place, with the error). - Synced: "Synced" (with its age) only shows once every account that the core polls has answered at least once since the start. A failed poll is also an answer; the error bar says why it failed. Until then the status bar counts the repositories that have answered.
- Unknown is not zero: a repository whose data has not arrived is a placeholder, never missing, "Empty" or a count of 0. "Only with work" keeps such repositories in the list until their data is known.
- A failed first poll keeps the data from earlier, still marked as from earlier.
- Repository by repository: the core reports each repository's progress as it is fetched (the
repo-progressevent: the account's listing first, then for each repository the start of each read and one event once it is through, with its dashboard row). The sidebar and the counts fill in as the events arrive, without waiting for the whole account. The core keeps the steps of each account's latest poll (get_repo_progress), and a window that opens while a poll runs replays them, so it knows the listings it did not hear.
The start dialog#
While a start is not through, a dialog lies over every page (src/views/shell/StartDialog.tsx,
model in src/state/startDialog.ts, #1421). It lists the steps of this start, each with its state
(waiting, running, done, error, or a note) and its progress, in words from the user's side:
- Signing in to accounts: "1/3" until every account is signed in: the forge accepted its token, which the listing of its repositories shows (or the account answered). The account's whole load is the next step. An account that answers with an error is retried by the sync; for 30 seconds the step only says "trying again", so a short network blip never shows as an error.
- Loading repositories: "12/33 (36 %)", or what loads right now while a repo list is still open
(
src/state/loadPanel.ts). It waits while no account is signed in. - Starting background services: done once the app's own service step is through (
launch_state,src-tauri/src/launch_state.rs) and every awaited service runs. When that step restarted the services (after an update), only what they wrote since counts; their activity from the old run never makes a start look finished. A service that is not up a minute later is an error. - Looking through issues: the classifier's first full pass since it started: "12 of 33
repositories with autopilot" against the pass's own plan (
Request::Pass,PassProgressincrates/core/src/service_rpc.rs): each account adds the repositories the pass reads once it listed them, so the total is fixed before the reads count up, and only finished reads count. After the last repository the pass still stores its picture; the step then says "Finishing …" without a count. A classifier that does not tell its plan shows only the running time. - Reaching worker machines: "1/2" from
DispatcherStatus.machines. A machine that does not answer 30 seconds after the dispatcher started is only a note: Gitoodo goes on without it. - Handing out work: the first dispatcher round after the first look through the issues.
A step that runs longer than 2 seconds shows its running time at the end of its line and a
slim bar under it, so a fast start stays clean. The bar is filled when the source knows a count,
with the count in words under the name ("12 of 31 repositories (38 %)"): signed-in accounts,
loaded repositories, repositories the classifier read in this pass, reachable worker machines,
and for handing out work the filled worker slots of those the queue can fill (workers of
min(max_workers, workers + queued)). A running step never shows a full count: once its count is
through, what is left has none, and the step says "Finishing …". Otherwise a faint band runs along
the bar; with reduced motion a short block breathes in its middle instead, never a full bar.
Under the intro one bar shows the whole start, with its percentage and, when known, the time
left: "37 % · about 20 s left" (src/state/startProgress.ts). Each step weighs what it took at
the last start (kept in the window's local storage: milliseconds per step, nothing else), else a
typical share. A step adds its own share of done work only where it has a count; a step without
one counts once it is done, so the percentage never pretends and never creeps towards 99 %. The
bar never goes backwards: a step that turns out longer only slows it. The time left comes from
this start's own rate where a count runs long enough to tell (2 seconds), from the last start's
durations before that, and is left out when neither knows, e.g. at the very first start. The
worker machines are reached beside the other steps, so their time does not add to the rest.
Steps that do not apply are left out: without background services (store build, direct mode) only the first two; a service that is switched off or not set up is not awaited; with the orchestrator off, nothing the dispatcher does.
The window is free once no step holds it. A step that failed or runs longer than usual (90 seconds, the look through the issues 3 minutes) offers "Go on without this step", an error also "View status" and "Open log". Tab stays inside.
The dialog can always be closed, also while the first sign-in runs: with "Start now" at its foot,
the close button at its top or Escape. Loading goes on; the window is usable at once. While the
start still runs, the status bar shows a calm chip instead of its load line, "Still loading ·
42 %" with a slim bar (src/views/shell/StartChip.tsx, shared through
src/state/startBackground.ts); a click opens the dialog again. The chip is a plain button in
the tab order, so Enter and Space open the dialog too; a polite live region beside it says the
same words to screen readers, at most every 5 seconds with the latest percentage
(src/ui/throttledAnnouncement.ts, shared with the dialog). The chip goes once the start is
through. Nothing of it is stored: the next cold start shows the dialog again unless that start is
fast. Views whose data is not loaded yet say so ("loading …") instead of showing an empty list or
zero counts (see "Start cost").
It shows only after 400 ms (a fast start never flashes) and once per window: a new view or a wake from sleep never brings it back, only a real reload. Screen readers hear the running step or the one that needs the user at most every 5 seconds; reduced motion stops the breathing dot.
Closing the dialog (with "Start now", the close button or Escape) hands the focus back to the
element that had it before the dialog opened (#1692): the control the user reached during the
dialog's delay, or, when the chip opened it again, the chip shown again. When nothing had the
focus, the shown page takes it (#1163); focus that went somewhere else meanwhile stays there
(focusReturn in src/views/shell/StartDialog.tsx).
Actions that wait for their data#
An action whose data still loads is not hidden and never fails with an error: it stays in place
and focusable, reads as unavailable (aria-disabled) and says why on hover and to screen readers
(aria-description), "Still loading … " with what it waits for (src/ui/loadLock.ts, the
locked prop of Button). A press does nothing; from the keyboard the sidebar announces the
reason instead.
| Action | Waits for |
|---|---|
| A repository's autopilot switch (row, its menu, a multi-pick) | The stored repository states, which the switch reads (statesLoading) |
| "Add to the release" in the release plan | The release plan (the repositories' releases the dialog offers) |
| Moving an issue between releases, naming a milestone | Shown only with the plan or the milestone read |
| Creating or renaming labels in the setup assistant | Shown only once the label preview is read |
Retried, not failed#
While the start runs, a failure that the next try gets over by itself is not shown as an error
at once (src/state/startRetry.ts, src/state/useRetryGrace.ts). For the same 30 seconds the
start dialog says "trying again", the view keeps saying "loading …"; only a failure that lasts, or
one after the start, shows with its cause:
- Account error bar: a forge that does not answer, a rate limit or a failed poll
(
isRetriedCause); a rejected token or a TLS problem shows at once. - Board, queue and release plan: services that are still starting or restarting after an
update (
retriedAtStart); the view asks again every 3 seconds meanwhile. A missing command-line tool or a protocol mismatch shows at once. - Milestone line: a forge or network that does not answer, a server error or a rate limit is read again every 3 seconds; no access or no such repository shows at once.
- Workers tile of the overview: a dispatcher that is not up yet shows "loading", not "not reachable".
Lists and counts follow "Loading in place" and "Unknown is not zero": the shared load line or
rowsLoading instead of "empty" or "0".
Loading in place#
Every list that is still loading says so in its own place, with one shared line
(src/views/shell/LoadLine.tsx, model in src/state/loadLine.ts): what loads, how far and a
slim bar, e.g. "Loading the queue … 12/33 repos (36 %)". It counts the same repositories as the
start dialog and stays until the list has its data; a list that waits for its own source too (the
worker list, the release plan, the status) keeps it, without a count, until that answered. An
empty list is never called empty while it loads. Used by the queue, the worker grid, the sidebar,
the release plan, "Asked of me", the board, the overview, the repo page and the status page. Only
the first line on screen speaks to screen readers.
The browser demo shows a slow start with ?stagger (the services restart as after an update)
and adds a worker machine that never answers with &trouble. scripts/start-shots.mjs captures
the dialog and the lines in place into docs/startup-shots/.
The classifier's pass#
The queue, the board and "Synced" show the classifier's picture, so they wait for its pass
(src/state/classifierPass.ts, kept current by src/state/classifierPassStore.ts, which asks
the read model every 2 seconds while a pass runs and every 20 seconds after). A pass is through
once the model has its polled_at; until then the repositories with their own polled_at count
as read. A model kept from the classifier's earlier run (after an update) has neither, so a queue
shown from it is never called empty: it shows the load line with the pass's count instead. A
classifier that does not answer three times in a row (direct mode, not set up) is not waited for.
The status bar shows "Syncing … 14/60 repos" (the bar joins after 2 seconds) until the window has every account's answer and, with the orchestrator on, the classifier's pass is through; only then "Synced", with the time of the classifier's last whole pass. The bars move: a band while the total is not known, a soft light over the fill once it is; with reduced motion the band becomes a calm pulse, the light stops, and the count stays.
Next sync#
The classifier reads the forges in polls; the dispatcher places work from the model of its last
finished poll every 5 seconds (PUSH_ROUND_SECS). A change on the forge therefore reaches the
autopilot with the end of the first poll that started after it. Every change the user makes in
the app (an answer, a comment, a priority or status, a new task, a release focus or plan, the
autopilot switch, adopting a repository, a finding or a resolved need) asks the classifier to poll
at once (SyncHub::changed in src-tauri/src/sync.rs; the autopilot switch through
nudge_classifier), instead of waiting out its interval. The autopilot switch needs it too:
placement reads each repository's state from the classifier's model. Saved release rules ask the
same way. A test in src/views/shell/SyncEntry.test.ts holds every command in
CHANGE_COMMANDS (src/core/changes.ts) to it.
The classifier tells its clock on request (Request::PollTimes in crates/core/src/ service_rpc.rs): the start of the running poll, the end and length of the last one, when the next
one starts, and whether one was asked for. The status bar asks every 10 seconds, every 2 seconds
while a change waits (src/state/nextSyncStore.ts, logic in src/state/nextSync.ts):
- Normally it shows "Synced 2 min ago". The countdown stays on demand: in the tooltip and in the small panel a click opens, "Next sync in 0:42" (or "Syncing now") with "Sync now", which polls every account and the classifier at once.
- While a change of the user waits for the classifier, the entry says when it takes effect: "Takes effect in ~40 s", from the last poll's length and one push round; "Takes effect shortly" while no poll length is known yet. It counts from when the change was sent and ends one push round after the first poll that started after it; after 15 minutes it no longer counts as pending.
The browser demo's classifier polls 20 seconds every minute (?pollMs= changes the length) and
answers "Sync now" and every change the same way (src/platform/demo/pollClock.ts).
Shimmer#
Placeholders use the shared .shimmer class (src/ui/tokens.css): the grey --color-skeleton
with a light band (--color-skeleton-shine) that runs across it every 1.8 seconds. With reduced
motion the band is off, and the placeholder only fades slowly. It uses design tokens only, never a
meaning colour.
Start cost#
What a start reads, per account (fetch_account in crates/core/src/sync/fetch.rs):
- Repo list: one listing, about 70 ms.
- Questions and tasks: per repository its open issues and pull requests (the question pass,
questions.rs). - Dashboard rows: per repository the counts of every configured label, its open issues and
pull requests with their checks (
dashboard.rs). On Gitea and Forgejo every label count is a request of its own (label_counts), and these forges send no ETag, so nothing answers "304 Not Modified".
The classifier's pass (the "Looking through issues" step) and the release plan run in the
background services and do not hold the window's own load. With GITOODO_LOG=debug the sync
logs each account's phases as sync_phases (docs/logging.md).
The dashboard rows are the expensive part: on the dev forge with 36 repositories they took 46 to 119 seconds, the questions 4 to 6 seconds. Reading them four repositories at a time did not help (the forge itself is the bottleneck, the times only spread more), so it is not done. Instead:
- Rows after the first poll. An account's first poll in a run leaves the dashboard rows out;
its questions and repository list are there after a few seconds, and the next poll follows at
once and reads the rows (
dashboard_planinsrc-tauri/src/sync.rs). Until they arrive the snapshot saysrows_pending: the window keeps the rows it shows from earlier, and where there are none, the board, a repository's list and the review's figures say "loading" instead of "nothing open" (rowsLoadinginsrc/state/loading.ts). - The view from earlier always shows. The core answers at once with an empty, unsynced event
per account; it used to win over the stored view, so the view from earlier was never shown in
the real app (only in the demo, whose core answers later). Now such an event no longer counts
as data (
withEarlier).
Measured with the real test app against the dev forge (1 account with 36 repositories, plus the fixture account), three cold starts each, each a new process:
| Start | Sidebar complete, before | All loaded, before | Sidebar complete, after | All loaded, after |
|---|---|---|---|---|
| First (no stored view) | 48.2 s | 48.3 s | 8.2 s | 9.1 s |
| Again (stored view) | 61.1 s | 61.2 s | 0.21 s | 8.8 s |
| Again (stored view) | 75.6 s | 75.7 s | 0.19 s | 6.2 s |
Before, the view from earlier was never shown (from_earlier: false); after, it is on every
start that has one. First content showed after 0.14 to 0.20 s in both. The dashboard rows follow
in the background, 60 to 70 s after the first poll on that forge; warm polls stay as they were
(the rows every 5 minutes).
Measuring#
The window logs its start once, when every account has answered, as the start_timings event
(docs/logging.md). It records milliseconds since the page began loading:
firstContentMs: first content shows, either from earlier or from the core;sidebarMs: the sidebar names every repository with data, with no placeholder left;allLoadedMs: every account has answered;
plus the number of accounts and repositories, and whether a view from earlier was shown.
The values are also on globalThis.gitoodoStartTimings while the window runs.
The browser demo simulates a slow start with ?stagger (or ?stagger=<ms>, the base step,
default 400). It works like this:
- every account starts unsynced;
- each account lists its repositories after one to four steps, reports them one by one at its own pace and then sends its full snapshot;
- the orchestrator answers after two steps;
- the demo keeps its view from earlier for the tab, so a reload shows the second start.
Measured in the demo (4 accounts, 60 repositories, ?stagger=400, Vite dev server, headless
Chrome):
| Start | First content | Sidebar complete | All loaded |
|---|---|---|---|
| First (nothing earlier) | 481 ms | 9605 ms | 10115 ms |
| Again (view from earlier) | 139 ms | 139 ms | 9797 ms |
In both starts, placeholders show from the first frame. On the second start, the sidebar shows all 60 repositories from earlier at once. The demo's numbers are no measure of a real forge; see "Start cost" for those.