Skip to content

Add Docker Hub image search (Explore) - #9

Merged
kylemclaren merged 1 commit into
mainfrom
feat/docker-hub-search
Jul 4, 2026
Merged

kylemclaren merged 1 commit into
mainfrom
feat/docker-hub-search

Conversation

@kylemclaren

Copy link
Copy Markdown
Owner

Summary

A new Explore screen that searches Docker Hub and pulls straight into the local container store — the one competitive gap versus comparable tools.

  • New network seam (Core/Net/HTTPClient.swift): HTTPClient protocol + URLSessionHTTPClient, the network-side counterpart to CommandRunner. The container CLI has no registry-search command, so this is the one place the app talks to the network directly; it's mockable for tests.
  • DockerHubService over Hub's legacy /v2/search/repositories/ (flat schema, exact star/pull counts) plus a per-repo tags endpoint. Models decode Hub's snake_case and nanosecond timestamps (dates kept as String).
  • Explore feature: debounced, cancellable search; Official badges + star/pull counts; a per-repo tag inspector (size / platform / date); one-click Pull that pre-fills the existing pull sheet with docker.io/<ns>/<repo>:<tag>.
  • Wiring: a distinct accent Explore button pinned at the bottom of the sidebar, a "Search Docker Hub…" command-palette action, and dockerHubService on AppModel.

Tests

New DockerHubTests suite: URL building (percent-encoding), search/tags decoding, HTTP + decode error mapping, compactCount (including unit-boundary regressions), and ISO8601 parsing. Full suite: 106 tests, 14 suites, all passing; app target builds clean.

Notes

  • Adversarially reviewed; three confirmed issues fixed (results/inspector preserved on transient refine-errors, compactCount unit-boundary promotion, tag-flash on repo switch).
  • Also folds in the previously-added README Homebrew install section.

🤖 Generated with Claude Code

Adds an Explore screen that searches Docker Hub and pulls straight into the
local container store — closing the main gap with comparable tools.

- New network seam: `HTTPClient` protocol + `URLSessionHTTPClient` (Core/Net),
  the network-side counterpart to `CommandRunner`, since the `container` CLI has
  no registry-search command. Mockable for tests.
- `DockerHubService` over Hub's legacy `/v2/search/repositories/` (flat schema,
  exact counts) with a per-repo tags endpoint; models decode Hub's snake_case +
  nanosecond timestamps (dates kept as String).
- Explore feature: debounced, cancellable search; Official badges + star/pull
  counts; a per-repo tag inspector (size/platform/date); one-click Pull that
  pre-fills the existing pull sheet with `docker.io/<ns>/<repo>:<tag>`.
- Wiring: a distinct accent "Explore" button pinned in the sidebar, a
  "Search Docker Hub…" command-palette action, and `dockerHubService` on AppModel.
- Tests: URL building, search/tags decoding, HTTP + decode error mapping,
  compactCount (incl. unit-boundary regressions), and ISO8601 parsing.
- Also includes the README Homebrew install section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kylemclaren
kylemclaren merged commit e9cc7d8 into main Jul 4, 2026
1 check passed
@kylemclaren
kylemclaren deleted the feat/docker-hub-search branch July 4, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant