<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hutch.git/Hutch/Views/Repositories/RepositoryDetailViewModel.swift, branch v3.8.0</title>
<subtitle>ios client for sourcehut. swiftui.
</subtitle>
<id>http://git.krz.sh/krz/hutch.git/atom?h=v3.8.0</id>
<link rel='self' href='http://git.krz.sh/krz/hutch.git/atom?h=v3.8.0'/>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/'/>
<updated>2026-07-16T06:06:46+00:00</updated>
<entry>
<title>fix: download artifacts through the API instead of handing them to Safari</title>
<updated>2026-07-16T06:06:46+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-07-16T06:06:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=871b04159aa47c0b0e62e2520c2f30e81f0f024b'/>
<id>urn:sha1:871b04159aa47c0b0e62e2520c2f30e81f0f024b</id>
<content type='text'>
Tapping download opened Artifact.url in the browser, which answered with
"Authorization header is required". That URL is not a web page: git.sr.ht
resolves it to &lt;api origin&gt;/query/artifact/&lt;checksum&gt;/&lt;filename&gt;, which demands
a bearer token. Safari has none and no way to get one, so the download could
never have worked — this predates the upload work.

Fetch it with the client that already holds the token and hand the user the file
through a share sheet. fetchData mirrors fetchText, including its host guard, so
an authenticated request still cannot be aimed anywhere but *.sr.ht over https.

Also guards zero-byte uploads. sr.ht streams into S3, which rejects a zero-part
multipart completion with "MalformedXML: UnknownError" — an error that says
nothing about the cause and cost a round of testing to identify. Empty files are
now refused by name before the request is made.
</content>
</entry>
<entry>
<title>feat: upload and delete repository artifacts</title>
<updated>2026-07-16T04:50:18+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-07-16T04:50:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=c4930f31ffc5d7c5de5eeafd3da184c7691f8ab7'/>
<id>urn:sha1:c4930f31ffc5d7c5de5eeafd3da184c7691f8ab7</id>
<content type='text'>
uploadArtifact and deleteArtifact existed in git.sr.ht's API but were never
called, so the artifacts tab could only download.

Upload is reachable two ways, and the second is the one that matters: the tab
only lists tags that already carry an artifact, so a per-section button alone
could never attach the first one to a tag — and the app cannot create that first
artifact any other way. A toolbar action picks from all tags instead.

The file variable is top-level here, unlike meta's avatar upload where it nests
inside an input object. This is the second caller of executeMultipart, which
until now only served avatars.

Artifacts are tarballs and signatures, so the upload declares
application/octet-stream rather than guessing a type from the extension.
Security-scoped access is released after the read, since fileImporter hands back
a URL the app does not otherwise own.

Both actions are gated on repository ownership, reusing the check
RepositoryDetailView already applies to its other management surfaces rather
than recomputing it. Delete sits behind a confirmation naming the file.
</content>
</entry>
<entry>
<title>feat: add persistent stale-while-revalidate API cache</title>
<updated>2026-05-07T01:30:34+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-05-07T01:30:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=57e4f34b4613c09beb0cb757ac2ba2b43cc04daf'/>
<id>urn:sha1:57e4f34b4613c09beb0cb757ac2ba2b43cc04daf</id>
<content type='text'>
Introduce an actor-backed persistent cache layer at the SRHTClient boundary
for read-only SourceHut data. Cache entries now store stable metadata
including key, resource type, fetched/expires/access timestamps, payload
hash, schema version, and payload size, with bounded memory and disk usage.

Add centralized cache key builders and TTL defaults for repository, file,
ticket, build, log, profile, status, and list-style resources. Support
networkOnly, cacheOnly, cacheFirstThenRefresh, and refreshIgnoringCache
policies, plus request coalescing for duplicate in-flight cache keys.

Integrate first-pass caching into high-value low-risk read paths:
- build detail and completed/active build logs
- ticket detail
- README lookup
- repository tree, blob, and linked file reads

Keep mutation paths network-only and add simple prefix invalidation after
ticket and build mutations. Add compact cached/stale UI status rows and a
Settings action to clear the persistent cache.

Add focused cache tests covering round trips, expiration, stale fallback,
policy behavior, request coalescing, prefix invalidation, size limits, LRU
pruning, expired pruning, and mutation bypass behavior. Document storage,
key, TTL, invalidation, limitations, and next recommended targets.
</content>
</entry>
<entry>
<title>fix: ensure all branches and tags are accounted for and not cutoff due to pagination</title>
<updated>2026-04-20T17:51:22+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-20T17:51:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=d29fbef60abdffaee190b758530dde9212745ed2'/>
<id>urn:sha1:d29fbef60abdffaee190b758530dde9212745ed2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: show empty state for bare git repos instead of an error</title>
<updated>2026-04-13T22:35:37+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-13T22:35:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=30decf6d9b6b95277cbd8b8a7d9e23d9ce5413ca'/>
<id>urn:sha1:30decf6d9b6b95277cbd8b8a7d9e23d9ce5413ca</id>
<content type='text'>
git.sr.ht returns "internal system error" from the references query and
"reference not found" from the log/readme queries when a repo has no
commits. Broaden isEmptyRepositoryError to cover missingReference,
unknownRevision, noRows, notFound, and those two message strings, then
apply the same silent-empty treatment to loadReferences and loadArtifacts
(which previously surfaced any error directly to the user).

Fixes: https://todo.sr.ht/~ccleberg/hutch/60
</content>
</entry>
<entry>
<title>fix: mercurial parity and graphql handling</title>
<updated>2026-04-13T19:20:27+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-13T19:20:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=5e63048ab6a741ae947f7fe42efcb5206a3f3963'/>
<id>urn:sha1:5e63048ab6a741ae947f7fe42efcb5206a3f3963</id>
<content type='text'>
- implements consistent UX between repo types
- ensures centralized services and routes are used between repo types
- graphql error handling is centralized
- error messages are consistent

Implements: https://todo.sr.ht/~ccleberg/hutch/58
Implements: https://todo.sr.ht/~ccleberg/hutch/59
</content>
</entry>
<entry>
<title>feat: show commit dates in Refs tab</title>
<updated>2026-04-02T04:37:12+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-02T04:37:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=0bef9acc515cfcb4ac6e2530cd34cbdbc47c2c1d'/>
<id>urn:sha1:0bef9acc515cfcb4ac6e2530cd34cbdbc47c2c1d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>v2.1: bundled polish and fixes</title>
<updated>2026-03-19T21:59:16+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-03-19T21:59:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=b82bbeeea48ad27832a355c2a41408559c411104'/>
<id>urn:sha1:b82bbeeea48ad27832a355c2a41408559c411104</id>
<content type='text'>
</content>
</entry>
<entry>
<title>v1.0</title>
<updated>2026-03-18T04:19:43+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-03-18T04:19:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=32ad6cab8d58d99ebd8a28e8fa6e6f4e587cb1e5'/>
<id>urn:sha1:32ad6cab8d58d99ebd8a28e8fa6e6f4e587cb1e5</id>
<content type='text'>
</content>
</entry>
</feed>
