v0.22.0 a85da87

types.ts RawHistoryFolder

1import type { HistoryEntry, SearchShortcut } from "../types/generated.js";
2
3type ThemeManagerAPI = {
4  setUserPreference: (theme: "light" | "dark") => void;
5  getCurrentTheme: () => "light" | "dark";
6};
7
8// Global window API types for browser integration
9declare global {
10  interface Window {
11    // Toast system API
12    __dumber_toast_loaded?: boolean;
13    __dumber_showToast?: (
14      message: string,
15      duration?: number,
16      type?: "info" | "success" | "error",
17    ) => number | void;
18    __dumber_dismissToast?: (id: number) => void;
19    __dumber_clearToasts?: () => void;
20    __dumber_showZoomToast?: (zoomLevel: number) => void;
21
22    // Theme integration
23    __dumber_initial_theme?: string;
24    __dumber_setTheme?: (theme: "light" | "dark") => void;
25    __dumber_color_scheme_manager?: ThemeManagerAPI;
26
27    // History callbacks
28    __dumber_history_recent?: (data: HistoryEntry[]) => void;
29    __dumber_history_error?: (error: string) => void;
30
31    // Shortcuts callbacks
32    __dumber_shortcuts_loaded?: (data: Record<string, SearchShortcut>) => void;
33    __dumber_shortcuts_error?: (error: string) => void;
34
35    // WebKit message handler
36    webkit?: {
37      messageHandlers?: {
38        dumber?: {
39          postMessage: (message: unknown) => void;
40        };
41      };
42    };
43  }
44}
45
46export interface ToastAPI {
47  show: (
48    message: string,
49    duration?: number,
50    type?: "info" | "success" | "error",
51  ) => number;
52  dismiss: (id: number) => void;
53  clear: () => void;
54  showZoom: (zoomLevel: number) => void;
55}
56
57export interface ThemeAPI {
58  setTheme: (theme: "light" | "dark") => void;
59  getCurrentTheme: () => "light" | "dark";
60}
61
62// Message types for WebKit communication
63export interface BrowserMessage {
64  action: string;
65  data?: unknown;
66}
67
68export {}; // Make this file a module

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close