Overview of the Notifications feature
maingh-dash for displaying and triaging GitHub notifications directly within the terminal. It is designed to follow the same architectural patterns used by the existing PR (Pull Request) and Issue views.repository·main·Indexed 11 days ago
https://github.com/dlvhdr/gh-dashA terminal user interface (TUI) for GitHub that enables developers to manage pull requests, issues, and other activities using vim-style keyboard shortcuts and custom workflows. Features include customizable views, YAML-based configuration, and integration with the GitHub CLI.
gh-dash for displaying and triaging GitHub notifications directly within the terminal. It is designed to follow the same architectural patterns used by the existing PR (Pull Request) and Issue views.DASH is a rich terminal user interface (TUI) designed for GitHub that allows developers to manage their workflow without leaving the terminal. It provides a keyboard-centric experience for navigating and interacting with GitHub repositories.
The dash configuration is schematized and covers several functional areas. You can find detailed documentation for each of the following categories:
The documentation site follows the Starlight/Astro directory structure:
.md or .mdx files to src/content/docs/. Each file name determines its route.src/assets/ and reference them in Markdown using relative links.public/ directory.astro.config.mjs and src/content.config.ts..
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ └── docs/
│ └── content.config.ts
├── astro.config.mjs
├── package.json
└── tsconfig.jsonDASH uses a layered configuration model where settings are applied in a specific order of precedence. This allows you to define common settings (like themes and keybindings) globally and override or extend them for specific repositories or one-time sessions.
Precedence Order (Highest to Lowest):
.gh-dash.yml file in a git repo root, or settings provided via the --config flag or GH_DASH_CONFIG environment variable.include directive within a config file (merged in order, later files override earlier ones).$HOME/.config/gh-dash/config.yml (following XDG specs).When merging:
keybindings are unioned across all files.sections are taken from the file that defines them (they are not unioned).Users should be aware of the following constraints in the Notifications feature:
~/.local/state/gh-dash/ and are not synced with GitHub or other machines.reason on the server. All notifications are fetched before client-side filters are applied.Commands in the notifications section are split into two categories based on their scope:
These operate on the internal state of the notificationssection and are triggered by keybindings in the section's Update method. They include:
markAsDone(): Persists the current notification's ID and updated_at timestamp to the DoneStore.markAllAsDone(): Marks all currently visible notifications as Done.markAsRead(): Marks the current notification as read.markAllAsRead(): Marks all notifications as read.unsubscribe(): Unsubscribes from the current thread via the GitHub API.openInBrowser(): Marks the notification as read and opens it in a browser.These require enriched data (like full PR details) that only exists in the notificationView (sidebar). They are called from ui.go rather than the section itself:
DiffPR(ctx, prNumber, repoName): Opens a diff view for a specific PR.CheckoutPR(ctx, prNumber, repoName): Checks out a PR branch locally.Since GitHub's API does not natively support 'bookmarks' or a persistent 'done' state that hides notifications from all views, gh-dash implements these locally.
~/.local/state/gh-dash/bookmarks.json as a JSON array of IDs.🔖 icon.data.GetBookmarkStore() singleton.~/.local/state/gh-dash/done.json as a JSON object mapping IDs to RFC 3339 timestamps (id -> updatedAt).DoneStore tracks the updated_at timestamp. If a notification is updated (e.g., a new comment is added) after it was marked as 'Done', it will automatically resurface in the UI.Each notification row in the table uses a three-line layout to provide a visual hierarchy:
🔖 icon (in WarningText color) if bookmarked.Unread Indicator: Unread notifications are identified by a blue dot displayed below the notification type icon. Note that text is not dimmed for read notifications; only the blue dot indicates status.
? help display in the application dynamically updates to show the applicable keybindings based on the type of notification content currently being viewed (e.g., PR vs. Issue).Notifications in gh-dash require an explicit action to view content to prevent accidental marking of items as 'read' (a side effect of the GitHub API).
When a notification is selected but not yet viewed, an action prompt is displayed in the Preview pane. Users can then choose to:
[Enter] to view the PR/Issue (this marks it as read).[D] to hide the notification locally.[m] to mark it as read without opening it.[u] to stop receiving notifications for the thread.[b] to bookmark the item.[t] to toggle filters.[S] to sort.[o] to open the notification in a web browser.For non-PR/Issue types (like Discussions or Releases), the [Enter] key defaults to 'open in browser' instead of 'view'.
Press [Enter] to view the PR
(Note: this will mark it as read)
Other Actions
[D] mark as done
[m] mark as read
[u] unsubscribe
[b] toggle bookmark
[t] toggle filtering
[S] sort by repo
[o] open in browser
[Enter] viewSmart Filtering automatically adds a repo:<RepoName> filter to your PR and issue sections if they do not have an explicit repo: field. The <RepoName> is determined by:
GH_REPO environment variable (if set).upstream, then github, then origin).git remote if none of the above match.Managing Smart Filtering:
smartFilteringAtLaunch: false in your configuration.t key (or your custom binding for togglesearch)./ to edit the search bar. Removing the repo: filter manually will turn off Smart Filtering for that section; adding it will turn it on.smartFilteringAtLaunch: false