Skip to content
killallgitPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GH Ticker

A small Rust + Iced activity ticker. Live GitHub access uses the existing GitHub CLI login. No separate token form, inbox/read state, desktop notifications, or row click actions.

Development tasks

Install Task alongside Rust and gh. Running task only lists commands; it does not open a window.

Command Purpose Opens UI?
task setup Fetch locked Rust dependencies No
task dev Start the app using saved settings; live GitHub is the default Yes
task dev:mock Start offline mocks with a separate saved profile Yes
task build Compile the app without launching it No
task test Offline unit/integration tests with fake CLI processes No
task test:live Real account/repository/public-feed API smoke check through gh No
task fmt / task fmt:check Apply/check formatting No
task lint Clippy for all targets No
task check Formatting check → offline tests → Clippy → build No

Extra Cargo arguments can follow --, e.g. task test -- --test github_live or task build -- --release. Run task setup first if offline checks report missing dependencies. Live API verification is deliberately excluded from task check.

The user has explicitly approved GUI and full end-to-end verification, superseding the earlier GUI pause. task test:ui still requires ALLOW_GUI=1 because it can disrupt the mouse. No watch/relaunch loop is configured.

For repeatable native-window, conditional-request, 451, archive-restart and sound checks, run python3 scripts/e2e_check.py --allow-gui --allow-audio on macOS. See verification results and limits.

GitHub access

Install Rust 1.92+ and gh, and use a terminal where the existing gh login works. The app makes read-only requests to github.com; it never extracts tokens or runs an interactive login. Missing CLI, authentication/SSO, permissions, rate limits, and network failures appear in Settings. It does not fall back to mocks when live access fails.

Default behavior on the next app launch:

  1. Read GET /user to identify the active account.
  2. Discover accessible repositories through paginated GET /user/repos (owner, collaborator, and organization memberships).
  3. Poll enabled repositories through GET /repos/{owner}/{repo}/events.
  4. Retain original event JSON, deduplicate by event ID, and show events newest first.

Everything starts enabled. Owner and repository exclusions stop future requests to those feeds; an already-running request may complete. Type/person filters are local display filters, so collecting remains broad. Re-enabling a repository restores retained rows and resumes polling within its cooldown. People currently means actors seen in collected repository events, not account-wide teammate subscriptions.

No GitHub App installation or webhook setup is required. Visibility still follows the active token/account and organization policy. Enterprise hosts are not configured in this version.

Non-UI verification

These checks do not launch windows or contact GitHub:

cargo fmt --check
cargo test --offline
cargo clippy --offline --all-targets -- -D warnings
cargo build --offline

Transport tests use temporary fake gh executables; scheduler tests use deterministic clocks and saved responses. They cover subprocess arguments, timeout cleanup, bounded output, pagination, conditional requests, backoff, rate budgets, source cancellation/stale replies, source isolation, settings, and preserved raw payloads.

An explicit real-API check is available without launching any UI:

cargo run --example github_check -- --live

It reads the account, a one-record repository page, and the public iced-rs/iced event feed. Output contains only status/counts—not identities, repository names, credentials, or payloads. It does not save responses or edit preferences, and stops if the available rate budget requires a long wait. It is not a full private-repository coverage test.

Approved verification now includes 19 real native captures and a passing fake HTTP/CLI end-to-end app pipeline: callbacks, repository 451 blocking, actual conditional 304 responses, one actual macOS afplay playback, and request spacing greater than one second. Restart checks remain ongoing; the parent verification report will record final counts later. This does not establish native-picker automation, Windows playback, or all-platform verification. The visual-check example remains guarded by --allow-gui and explicitly forces mock mode.

App launch, when approved

cargo run

Live mode is enabled by default, including when loading older preferences without a mode field. Settings can switch between live GitHub and offline mocks; that choice persists. Turning live mode off cancels pending work and replaces live data with samples. Turning it on clears samples and restores recent live receipts from the archive before connecting. Refresh also cancels stale requests. Rate-limit deadlines survive refresh and mode switches.

For isolated offline development:

cargo run -- --mock

--mock starts in offline mode and uses a separate mock-preferences.json profile, so subscription/Settings/layout choices persist without overwriting the normal profile; feed navigation still resets on startup. It makes no GitHub calls unless you explicitly enable live mode in Settings; each --mock launch starts offline regardless of the saved source flag. Approved native captures and end-to-end checks have exercised the app; restart verification remains ongoing.

The macOS-first ticker stays above ordinary windows. Drag the narrow top strip (or collapsed status text) to move it. The − control collapses it to a 28px status bar; + restores it without resetting filters. The footer settings cog and filter SVG button left of Feed search open the same independent, normal native Controls window, selecting its Settings or Filters top tab respectively. Repeated opens reuse its window ID. Its native X closes only Controls. Opening or closing Controls never replaces the ticker stream, expands/collapses it, or changes its geometry. The menu-bar bell offers Show activity, Settings, Reset overlay position, and Quit.

Ticker height automatically follows its content, including wrapped text. Long lists scroll: automatic ticker height caps at 640px and 85% of the current monitor where supported. Resize using native edges or the ticker footer grip. Controls defaults to 840×640px with a 640px minimum and independent native resizing. Persisted settings_window now truly stores Controls geometry, distinct from ticker geometry. Fit restores the ticker's automatic height without changing width, filters, or selections. The empty stream shows only “No activity to show” and a small reset button, centered on both axes; Fit measures its natural height.

Windows tray/process code is included but unverified. Linux has overlay controls only; its tray is not implemented and Linux builds are unverified. Full-screen/system surfaces can appear above the overlay; Wayland can restrict positioning. Signed bundles and their launch PATH are not configured yet.

Grouping and drill-down

The dark-mode ticker has All events, By repo, By type, and By person tabs. These switch how current results are grouped—they do not change subscriptions by themselves. Group views show event counts and their latest timestamp. Selecting a group narrows the stream to that repository/type/person; switching category lets you narrow further. This is separate from the repository table in Subscriptions, which controls saved collection/display choices.

Active drill-down filters have individual Clear controls. Reset drill-down clears only those view selections; search and subscription rules remain unchanged. On startup, feed search/grouping/facets reset to the main activity view; subscription filters remain saved. Group counts reflect the current narrowed stream, so clear a facet before choosing a different value for that category.

Events are always ordered newest source timestamp first, even when older events arrive later. Groups are ordered by their most recent event, not by count. Rows remain non-clickable; group buttons are navigation/filter controls, not GitHub actions. Each event has a blue authored canonical-metaphor SVG icon whose hover text is exactly Kind - action (the action slug), a primary title and secondary repository. PR synchronize says “push commits” and uses the push icon, while the source kind/action tooltip stays unchanged. Branch pushes never imply PR activity. Right-aligned time uses local today’s 12-hour AM/PM time, yesterday, or N days ago; hovering it shows the exact source timestamp and origin.

Live arrivals use one authored 700ms expand animation that pushes older rows down, with a subtle shimmer on up to five new visible IDs. Startup, history loads and older pinned pages do not animate. Frame subscriptions run only during animation; Fit waits until it completes.

Subscriptions and Settings

At the top of Settings, Activity enabled is a master on/off switch. Off cancels pending requests, stops discovery/polling, and hides the stream in both live and mock modes. On resumes with your filters and retained rows intact. The choice is saved; older configurations default to enabled. It does not change GitHub watch settings or reset individual selections.

The top search matches title, repository, actor, event type, or action, case-insensitively, ignoring surrounding spaces. It resets on startup and cannot bypass subscription/global filters. Search text saves after a short debounce (or immediately when quitting/changing another setting).

The Controls Filters tab contains Subscriptions: Repositories, Event types, and People tables with only a Name, event count, and checkbox; redundant On/Off labels are removed. Owner mixed selections still show selected/total counts. Tabs are text-only and right-aligned, transparent when inactive, with navy hover/selected backgrounds. Feed search has extra inner padding and a bottom gap.

  • Repositories: a searchable owner/org → repository → event type tree. Owners start collapsed unless a saved expansion says otherwise. Owner checkboxes select/deselect all their repositories, including children hidden by the subscription search; a selected/total count identifies mixed selections. Expand the owner to see repos, then expand a repo for event-type choices. Repo IDs key child selections; normalized owner logins key owner groups.
  • Event types: all 16 documented feed types plus any additional type encountered. Zero-count types can still be configured.
  • People: actors seen in the current feed, keyed by account IDs; not cross-repository account subscriptions.

The Controls Settings tab owns the Activity enabled master switch, live/mock source, minimum polling interval, authentication/account status, Refresh, source/archive errors, Sounds, Open Debug, filter/geometry reset, and Quit. Open Debug and the error footer open an independent native Debug window; its native X closes only Debug. Debug shows current status and the latest 100 bounded request-metadata records: endpoints, HTTP codes, ETags, rate budget, backoff, and blocked repositories—never tokens or response bodies.

Owner, repository, global type, per-repository type, and actor selections intersect. Disabling an owner creates an opt-in baseline: newly discovered repos under that owner also stay off. You can check an individual child to enable only it; the owner then shows a mixed enabled count. Checking the owner selects all known children and restores the default for future repos, without changing their saved event-type choices. Hidden rows are not deleted. New repository IDs/types normally default to included, but a repository's Hide types creates an explicit all-off baseline: only types you subsequently check are shown there, including after restart. Unknown future types stay off for that repo until selected. Show types removes the local restriction and inherits global types again. Children marked (global off) remain hidden regardless of their local checkbox; use the Event types Subscriptions tab to change the global rule. Parent/global/master off settings always win. Bulk Show all/Hide all applies to the current category; with a subscription search active, Show matches/Hide matches affects only those results. Each Subscriptions tab remembers its own index search; switching tabs restores that tab's previous search without changing ticker search. Resetting filters does not change position or temporary search. App selections never mutate GitHub watch/star settings.

For example: expand owner/repo, choose Hide types, then check PushEvent and PullRequestReviewEvent. That repo shows pushes/reviews only; other repos retain their own choices. Child type filters do not trigger requests or reduce collection by themselves; unchecking the parent repo stops its polling. The Subscriptions search only finds tree rows and does not filter the event stream. It may narrow displayed children, but the owner checkbox always applies to the entire owner, not only those matches.

Changes apply immediately and persist with position, independent ticker/Controls dimensions, owner/repo expansion, and Preferences.subscriptions queries/tab (SubscriptionTab). Serde aliases read legacy settings data; the former App tab migrates to Repositories. Controls visibility is not saved. Startup always opens the expanded activity feed with empty feed search, All events grouping and no view facets—even if you quit with Controls open or the ticker collapsed. Subscriptions, Activity enabled, source mode, interval, geometry and event history are not reset. Saved preferences include search text and numeric facet IDs; they are local configuration, not GitHub data exports. On macOS: ~/Library/Application Support/dev.killallgit.gh-ticker/preferences.json. The new live_github flag and validated poll_interval (seconds) live here—not credentials or event bodies. Polling defaults to 60 seconds; the selector offers 30, 60, 120, and 300. Config values must be 15–86,400 seconds.

Persistence applies to both normal (task dev) and mock (task dev:mock) launches. Mock launches use mock-preferences.json beside the normal preferences file; the two profiles don't overwrite each other's choices. Switching source modes inside a normal launch keeps that normal profile. Settings must be readable/writable; the footer warns when saving is disabled or failing.

Saves replace the document only after writing a temporary file; failures retry. Unreadable/invalid existing settings disable saving for that session to preserve the original. Repair or move the file and restart to enable saving again.

Sounds

Sounds are opt-in in Settings and default off. Choose All Events or Per Event Type, with local-file Browse / Preview / Clear controls; an unassigned type is silent. Preview works while sounds are disabled; disabling aborts playback. File paths are stored in preferences; clips have a 30-second limit. The bounded eight-item queue coalesces duplicate paths within each batch.

Automatic playback accepts only LIVE events with new unique database IDs that pass persistent subscription filters, not temporary search/view facets. History, duplicates, stale replies, and malformed batches never trigger sound. macOS uses afplay for WAV/AIFF/MP3/M4A. Windows WAV support is code-tested only; Linux has no picker, but path input works. Native-picker automation, Windows playback, and all-OS operation are not verified.

Polling bounds and limitations

  • Sequential GETs, one in-flight request, and a one-second dispatch deadline preserved across cancellation; the UI thread never waits on gh. Manual Refresh is debounced by 500ms. Activity pause preserves retained data and selections.
  • Per-repository timing uses the slower of the configured minimum and GitHub's X-Poll-Interval.
  • Primary-budget headers pace requests; exhausted budgets wait until reset. Retry-After seconds/HTTP dates and exponential 60s–15min failure backoff are respected. Backoff is conservative across the source.
  • HTTP 451 suspends only the affected repository until explicit Refresh; it is not a rate limit. Blocked replies never leak into the stream or sounds.
  • ETags are sent on the first feed page. Actual conditional GET/304 behavior has been tested; 304 preserves cached events. A new ETag is committed only after the cycle's pages succeed, preventing a failed later page from being skipped on retry.
  • Up to 100 records/page and three event pages per repository—the documented 300-event timeline window. Discovery is capped at 100 repository pages; an incomplete catalog is not applied and automatic discovery stops at that cap.
  • gh requests time out after 30 seconds; stdout/stderr are bounded. Cancellation kills the subprocess. No shell or token extraction; received event objects are written only to the local SQLite archive below.
  • Queues and large repository counts can make actual intervals much longer than N seconds. Nothing polls after the app exits.
  • Initial polls load the recent available window, not an exhaustive history. GitHub documents feed latency of 30 seconds to 6 hours and a 30-day/300-event timeline cap. Busy repos, long gaps, and pagination over changing data can miss events.
  • Startup/live-mode entry loads the newest 100 unique archived GitHub events, ordered by source timestamp then event ID, not 100 repeated receipts. Newer / Older pages browse the archive with stable keyset cursors; each page contains at most 100 events and starts scrolled to the top. Live arrivals refresh page 1, never move an older page being read. Returning to page 1 shows the latest activity. Search, subscription filters, group counts and view facets apply to the loaded page, so fewer than 100 rows may be visible; use Older to continue. Disabled controls mark the ends. The separate background live/subscription cache still caps at 2,000 events; navigation keeps only the current page plus cursor bookmarks, not every visited page's payloads. Completed catalog discovery hides inaccessible repositories on every page, including an empty catalog; archive rows are never deleted.

Feeds expose selected event types/actions, not every GitHub mutation. Dedicated resource collectors, authored-user feeds, webhooks, and archive-wide search/export remain future work. See the data inventory.

SQLite event archive

All received event payloads now append to events.sqlite3 in the native application data directory. On macOS: ~/Library/Application Support/dev.killallgit.gh-ticker/events.sqlite3. --mock uses a separate mock-events.sqlite3. Neither is reset on startup; there is no pruning, retention limit, deduplication or automatic vacuum. SQLite is bundled with the Rust dependency.

event_receipts contains id, received_at_unix_ms, source, origin (live, captured, synthetic), and event_json (the original JSON value). Each received value gets a row, including duplicate source IDs, unknown types and malformed provider objects. Arrays from successful event-feed replies are archived before typed parsing, feed deduplication or display filtering. Already-received stale replies are archived but never applied to the feed. Aborted requests with no received reply and 304 responses produce no receipts. Excluded/unpolled repositories and GitHub-unexposed activity cannot be captured.

Writes use atomic batch transactions, WAL and FULL synchronous durability. An unavailable archive pauses new live collection. Failed writes keep the batch in memory, pause new requests and retry every five seconds; errors appear in Settings. Keep the app open until the error clears to preserve a pending batch. Startup restores one unique-event page, not the whole database. A GitHub-specific derived index points to the latest valid receipt for each event; malformed raw receipts remain archived but do not consume page slots. On first history access, existing receipts are backfilled in 500-row transactions. A checkpoint makes retries incremental/idempotent and catches receipts from older app versions. The index adds per-unique-event storage overhead to the raw-archive estimate below. This is an additive schema change: raw tables/append behavior are unchanged, so older binaries can still read/write them. To rebuild only the derived index, both github_event_history and its archive_index_state checkpoint must be rebuilt together; never remove event_receipts. Existing tmp/event.log files are left untouched, are no longer written, and are not automatically imported.

The archive can contain private repository names, comments and other sensitive payload content. Database/WAL/shared-memory files are owner-only on Unix and ignored by Git. Do not share them casually. No authentication headers or CLI credentials are added. The master switch stops new collection, not existing history.

Observe actual growth with read-only tools (macOS example; sqlite3 CLI is optional):

DB="$HOME/Library/Application Support/dev.killallgit.gh-ticker/events.sqlite3"
ls -lh "$DB" "$DB-wal" "$DB-shm" 2>/dev/null
sqlite3 -readonly "$DB" 'SELECT origin, count(*) FROM event_receipts GROUP BY origin;'

An offline estimate using 20 bundled public captured payloads repeated into 10,000 receipts measured 1,616 bytes/receipt including SQLite overhead (1,481 bytes mean JSON). At 1k / 10k / 100k receipts per day: approximately 0.05 / 0.45 / 4.52 GiB per 30 days. Actual mix and repeated deliveries matter; active WAL/shared-memory files add space. Reproduce without network access or UI:

cargo run --locked --offline --example archive_size

The existing startup diagnosis found zero receipts in the actual running SQLite archive and the legacy log. The received-event/reopen regression passed; no history was fabricated or imported, and no startup code fix was needed. That historical diagnosis used no UI launches or screenshots; current approved verification includes native captures, with restart checks still ongoing.

Offline mocks

Mock mode loads 20 captured public events and five explicitly labeled synthetic examples for pushes/PRs/comments/reviews missing from that snapshot. Rows say Captured, Synthetic, or GitHub according to their actual origin; modes never mix live events with examples.

The full captured set contains 11 API response bodies for richer future collectors. No private account data or credentials are stored in fixtures. Mock counts mean saved samples; live counts mean retained session events, not GitHub totals.

Component names

Use the component glossary as our ubiquitous language: activity feed, feed toolbar, view facets, drag bar, status footer, Controls window, Settings tab, Filters tab, Debug window, subscription filters, event and receipt. UI anatomy lives there; visual/interaction rules live in DESIGN.md.

Module ownership

src/
  app.rs                     # Messages, async task/cancellation wiring, window/tray state
  app/view.rs                # Ticker, Controls (Filters/Settings) and Debug widgets
  preferences.rs             # Native settings storage and safe restore
  event_archive.rs           # Private, durable raw SQLite receipts; no pruning
  sources/github/
    client.rs                # Read-only bounded asynchronous gh API transport
    live.rs                  # Discovery, per-repo cursors, rate-aware scheduling
    events.rs                # GitHub envelope, original JSON, display helpers
    feed.rs                  # Bounded GitHub feed, deduplication, catalogs/search
    drilldown.rs             # Temporary grouping/facets and latest-first group order
    filters.rs               # GitHub owner/repository/type/actor selections
    owners.rs                # Owner/org catalog grouping and search scope
    mocks.rs                 # Offline fixture loading and provenance

These remain GitHub-specific objects, not a universal cross-provider event interface. Additional providers should own sibling modules under sources/.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages