Feature/GitHub source - #114
Open
osbgx wants to merge 16 commits into
Open
Conversation
- New internal/githubsource/ package: parses GitHub URLs, queries Contents API, filters images, returns raw.githubusercontent.com URLs - Frontend: GitHub tab with URL input, lazy-loading image grid, download-on-use flow (reuses DownloadWallpaper) - Nav: Sources dropdown grouping Wallhaven, GitHub, Local - Tests: parseURL for 5 URL formats, filterImages, buildRawURL
Replace separate sourceItems array + slice rendering with a single
{#each tabs as tab} loop using a discriminated NavItem type.
Dropdown items (children) live inline in the nav data, keeping the
order explicit and extensible for future additions.
- ImageInfo now carries Type (file/dir) and Path fields - ListImages returns ListContentsResult wrapper with mixed file/dir items - Uses download_url from GitHub API directly (no branch resolution needed) - parseURL handles 3+ segment URLs as owner/repo/path for dir navigation - Frontend shows folder cards with folder icon; click navigates deeper - Up-arrow button in header for parent directory - Counter shows images and directories separately - svelte-check 0 errors, go test -v PASS
- Add in-memory TTL cache (5 min, 100 entry FIFO eviction) - Cache ListImages results to speed up repeated directory navigation - Add heart/favorite button on each GitHub image card (ToggleFavorite IPC) - Add star/bookmark saved-repos dropdown with localStorage persistence - Fix nested <button> in saved-repos list
…ecoding=async - Move heart to right side, add button to left (matches Wallhaven layout) - Heart always visible when favorited, hidden+hover-reveal when not - Remove bulk IsFavorite IPC loop on every render (N Go bridge crossings) - ToggleFavorite now drives the state directly from its return value - Add decoding='async' to RemoteImage img for smoother hover transitions
- Download full-res GitHub raw image in Go, resize to 300px PNG - Cache thumbnail on disk (~/.cache/aether/thumbnails/github/<hash>.png) - Return as data URL to frontend (single IPC call, tiny payload) - RemoteImage calls GetGitHubThumbnail instead of loading raw URL - First load downloads and caches; subsequent loads are instant
Re-generate Wails JS/TS bindings and bump indirect dependencies (go-toast, wails v2.11.0→v2.12.0). GetGitHubThumbnail entry re-ordered alphabetically in App.d.ts/App.js.
Kick off GetGitHubThumbnail for the first 12 images as soon as ListImages returns, so HTTP download + Go resize starts in the background. By the time the user scrolls to each card, the thumbnail is on disk and RemoteImage gets it instantly.
Text input filters grid results by filename (case-insensitive). Clears automatically when navigating to a new directory. Count changes to '12 / 20' style to show filtered vs total.
FavoritesView now calls GetGitHubThumbnail for remote URLs that don't have a native thumbUrl (GitHub favorites). Fire-and-forget so the loop doesn't block on HTTP downloads.
Add ThumbnailResult struct (dataURL, width, height) to Go thumbnail pipeline — dimensions come from image.Decode before resize. Cache them in a sidecar .dims file alongside the PNG so cached thumbnails also report original dimensions. Replace filename in card info bar with '1920×1080 · 1.2 MB' style; filename visible as tooltip.
- Stale cache entries (pre-dims migration) are now discarded so the next visit re-downloads the image and persists original dimensions. - Info bar layout matches Wallhaven: justify-between, dimensions left, file size right, same padding and font size.
…e Wallhaven) - New GitHubCard.svelte: lazy thumbnail via GetGitHubThumbnail, lazy favorite check via IsFavorite (both gated on intersection observer), loading shimmer (animate-pulse), heart/add positions matching WallpaperCard, dimensions + file size info bar, hover overlay with Use/Wallpaper only/Preview. - GitHubBrowser.svelte: remove per-card state (favState, dims, handleLoad/Favorite/AddExtra/Use/formatSize) — delegated to card. - RemoteImage.svelte is now unused (kept as no-op).
…and shrink-0 that broke layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a complete GitHub repository wallpaper browser as a new source tab
under the Sources dropdown. Supports
github.com, GitHub Pages(
*.github.io), andraw.githubusercontent.comURLs.Backend
internal/githubsource/— new package with GitHub Contents API client,URL parser (4 formats), TTL-cached
ListImages(), and server-sidethumbnail pipeline (
DownloadThumbnail→scaleImage→ PNG +.dimsdisk cache)
app.go—ListGitHubImagesandGetGitHubThumbnailWails bindingsFrontend
GitHubBrowser.svelte— URL input, saved repos (localStorage), namefilter, directory/file grid, preview overlay, card size toggle
GitHubCard.svelte— per-card intersection observer, thumbnail viaGetGitHubThumbnail, favorite/add-extra/use/wallpaper-only/preview actionsgithub.svelte.ts— Svelte 5 runes store with pre-warm (first 12thumbnails)
FavoritesView.svelte—loadRemoteThumbfor GitHub thumbnailsHeaderBar.svelte— restructured Sources dropdown (Wallhaven / GitHub / Local)RemoteImage.svelte— usesGetGitHubThumbnailinstead of inlineImagemodels.ts—githubsourcetypes (ImageInfo,ListContentsResult,ThumbnailResult)Docs
docs/github-source.md— feature overview, URL formats, usageREADME.md— GitHub source listed under Wallpaper ToolsReview fixes squashed in
golang.org/x/image/webpdecoder (thumbnails + extraction)canGoUpnow supports Pages and raw.githubusercontent.com URLsDownload→DownloadImage(generic HTTP downloader)