<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hutch.git/Hutch/Views/Settings/SettingsView.swift, branch main</title>
<subtitle>ios client for sourcehut. swiftui.
</subtitle>
<id>http://git.krz.sh/krz/hutch.git/atom?h=main</id>
<link rel='self' href='http://git.krz.sh/krz/hutch.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/'/>
<updated>2026-07-16T02:33:59+00:00</updated>
<entry>
<title>Phase 1: close the write gaps (#3)</title>
<updated>2026-07-16T02:33:59+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-07-16T02:33:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=b9ec80716ea015de5b6b31395fdc5ff03191398c'/>
<id>urn:sha1:b9ec80716ea015de5b6b31395fdc5ff03191398c</id>
<content type='text'>
* refactor: collapse duplicated request paths in SRHTClient

Five request paths each repeated the token guard, header setup, status-code
handling, and a ~35-line #if DEBUG logging block. The file carried that block
five times over.

Extract makeAuthorizedRequest, send, and encodedGraphQLBody, and route execute,
executeAndCache, executeMultipartFiles, and performGraphQLRequest through them.
executeMultipart is now the single-file case of executeMultipartFiles, which it
already was byte for byte. 938 lines to 612, with one copy of the logging block.

fetchText keeps its own guard: it is a GET to an allowlisted URL and must not
run GraphQL error checks over what is usually a plain-text build log.

One behavior change falls out. executeAndCache wrote the raw response to the
cache before decoding, so a 200 carrying GraphQL errors was cached and then
thrown. Routing it through performGraphQLRequest surfaces those errors first,
so error payloads are no longer cached.

* feat: edit and delete tickets

updateTicket and deleteTicket both existed in todo.sr.ht's API but were never
called, so a ticket could be filed and its status changed but its subject and
body were frozen from the moment it was created, and it could never be removed.

Edit opens a sheet seeded with the current subject and body. The input carries
only fields that actually changed, so an edit cannot clobber a field the user
did not touch, and Save stays disabled until something differs.

Clearing the body sends an explicit null via updateValue rather than a nil
subscript assignment, which would drop the key and silently leave the old body
in place — the same trap fixed for repository descriptions in 7ffef07.

Delete is destructive and irreversible, so it sits behind a confirmation
dialog naming the ticket and pops the detail view on success.

* feat: subscribe to and unsubscribe from tickets

ticketSubscribe and ticketUnsubscribe existed in the API but were never called,
so email notifications for a ticket could only be managed on the web.

Ticket.subscription is null when the user is not subscribed, so the detail
query now reads it and the menu reflects real server state rather than
guessing. The toggle updates optimistically and reverts on failure, so the
control never claims a subscription that did not take.

Decoded into the private payload rather than TicketDetail, which is Codable and
cached — adding a field there would have changed the cached shape and touched
every optimistic-update construction site.

* feat: subscribe to and unsubscribe from trackers

trackerSubscribe and trackerUnsubscribe existed in the API but were never
called. Tracker.subscription is null when not subscribed, so the state can be
read rather than guessed.

The read is a separate uncached query. The tickets query it sits beside is
paginated and cached, and a per-user subscription has no business riding along
in page payloads or being served stale from disk.

Unsubscribe passes tickets: false, so leaving a tracker does not silently drop
subscriptions to individual tickets the user opted into.

* feat: unsubscribe from mailing lists

mailingListUnsubscribe existed in the API but was never called, so the list of
subscriptions was readable and nothing more.

Scoped to unsubscribe. MailingList has no subscription field, unlike Ticket and
Tracker, so per-list state is only knowable from the subscriptions query — which
is exactly what builds this view. Subscribing would need a list the user is by
definition not subscribed to, and sr.ht exposes no discovery API to find one
(see SCOPE.md on hub.sr.ht), so there is nowhere honest to put that action yet.

The row is removed optimistically and restored if the mutation fails. The
confirmation says plainly that Hutch cannot resubscribe, since it cannot.

* feat: manage todo and lists email preferences

updatePreferences existed on both services but was never called, so these were
web-only settings.

The two services expose preferences/updatePreferences under identical names but
with different fields — notifySelf on todo, copySelf on lists — and there is no
shared preferences service, so both are read and written side by side. They load
concurrently and one service being unreachable does not hide the other's toggle.

These are server-side and apply beyond Hutch, unlike the @AppStorage toggles
above them in Settings, so the footer says so and each toggle reverts if its
mutation fails.

* refactor: drop the memory-only cache path

Two executeCached overloads existed with different return types and semantics:
one doing stale-while-revalidate against the persistent cache with TTLs, the
other only consulting the in-memory responseCache. The second was an easy thing
to reach for by mistake, since the compiler picked it purely on argument labels.

It turned out to be dead. All 38 call sites already used the TTL-aware
overload, and the memory-only one was the sole caller of executeAndCache, so
both are removed. Its doc comment promised refresh "via the onRefresh callback",
which the signature has not had for some time.

SRHTClient is now 569 lines, down from 938 before this branch.

responseCache stays as the in-memory layer behind cachedPayload and the three
view models that read it directly.

* chore: bump to 3.6.0 and record Phase 1

MARKETING_VERSION 3.5.0 -&gt; 3.6.0, build 87 -&gt; 88.

* fix: decode preferences responses on the main actor

The module sets SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor, so the response
types are implicitly main-actor isolated and their Decodable conformances are
too. Decoding straight from an `async let` used those conformances from a
nonisolated context, which warns today and is an error in the Swift 6 language
mode.

Move each fetch into its own method and `async let` over those instead, so
decoding stays on the main actor. This is what HomeViewModel.loadDashboard
already does, and the concurrency is unaffected — the network work still
overlaps, since execute suspends and frees the actor.</content>
</entry>
<entry>
<title>feat: add Safari extension for sourcehut deep links</title>
<updated>2026-05-14T17:41:55+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-05-14T17:41:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=0d61e05e98f6f020722ee4d43f024c1da348d2a9'/>
<id>urn:sha1:0d61e05e98f6f020722ee4d43f024c1da348d2a9</id>
<content type='text'>
</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>feat: user-defined time period for recent builds card</title>
<updated>2026-04-20T17:42:09+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-20T17:42:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=454c459394437f346a2d08d59a5504c0f6ec299f'/>
<id>urn:sha1:454c459394437f346a2d08d59a5504c0f6ec299f</id>
<content type='text'>
- limit Home failed-build counts to a configurable lookback window
and add the setting under Behavior.
- make the Recent and Builds rows fully tappable across the
entire cell and add coverage for the new failed-build filtering.

Fixes: https://todo.sr.ht/~ccleberg/hutch/67
</content>
</entry>
<entry>
<title>fix: remove prototype screens from developer menu</title>
<updated>2026-04-14T15:42:05+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-14T15:42:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=205c8ea9b2c6dfa62bc8b2342d1aa71e2da7d6ac'/>
<id>urn:sha1:205c8ea9b2c6dfa62bc8b2342d1aa71e2da7d6ac</id>
<content type='text'>
- removed prototype screens
- limited Recent section to 3 items
- added initial support for tips

Fixes: https://todo.sr.ht/~ccleberg/hutch/65
</content>
</entry>
<entry>
<title>fix: centralize URLs, tighten models, and polish SwiftUI bindings</title>
<updated>2026-04-14T00:44:44+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-14T00:44:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=fe1ccc69661603d419a642a450e4ac9e1258adb0'/>
<id>urn:sha1:fe1ccc69661603d419a642a450e4ac9e1258adb0</id>
<content type='text'>
- Add shared HutchDeepLinkURL constants for app, widgets, and tests.
- Bump marketing version to 3.1.2 and build to 70 (app + widget extension).
- Point Hutch stats default base URL at HutchStatsAPI; add SRHTWebURL status
  incident feed and reuse it from SystemStatusService.
- Group Project into Metadata and Resources; split ContributionStatsResponse
  into StatsWindow and StatsTotals with updated decoding and tests.
- Replace @Bindable usage with explicit Bindings in Profile, Projects list,
  and repository ACL flows; simplify Home pinned-item helper; add no-op
  bodies on cancel alert buttons where the compiler requires a statement.
- Move repository row build-status indicator next to the relative-updated
  caption and reserve a fixed 8×8 slot so the row does not jump when status
  loads.
- Use NSString.lastPathComponent for build artifact filenames; collapse
  duplicate ACL error branches; minor HutchStats HTTP and XMLParserDelegate
  cleanups.
- Point widgets at HutchDeepLinkURL helpers; align tests with the new
  response and URL types.
</content>
</entry>
<entry>
<title>feat(theme): AMOLED true-black rows via themedRow()</title>
<updated>2026-04-14T00:06:54+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-14T00:06:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=a6ad2b9815d72575206bdca860eef9db850cdf1c'/>
<id>urn:sha1:a6ad2b9815d72575206bdca860eef9db850cdf1c</id>
<content type='text'>
Apply listRowBackground(Color.black) per row in AMOLED mode using ThemedRowStyle
and themedRow() across Lists and Forms. Use themedList() for scroll/grouped
backgrounds. Treat segmented and clear list rows with isAMOLED-aware
listRowBackground where Color.clear was required. Removes reliance on UIKit
appearance for list cells on iOS 16+.

Implements: https://todo.sr.ht/~ccleberg/hutch/24
</content>
</entry>
<entry>
<title>release: v3.0.0 — navigation overhaul, Work view, and multi-pin support</title>
<updated>2026-04-13T18:09:57+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-13T18:09:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=f5f5757d0e1b78470429ae7cb9f742c95662849b'/>
<id>urn:sha1:f5f5757d0e1b78470429ae7cb9f742c95662849b</id>
<content type='text'>
Reworks the app's core navigation and home screen for v3.0.0:

- Replace Inbox with Work view: unified dashboard showing unread threads
  and assigned tickets, with All/Unread/Assigned scope picker
- Overhaul Home screen: redesigned with pinned items grid (trackers,
  repos, mailing lists, users), recent activity section, and system
  status banner; backed by HomePinStore supporting all resource types
- Simplify navigation bars across list screens: default toolbar shows
  only the primary action (+) and an overflow menu (…); pin, share, and
  select moved into the overflow menu; selection mode gets its own nav
  bar with Cancel / "N Selected" / All
- Consolidate repo detail toolbars: pin and share moved into the
  existing actions menu for both Git and Mercurial detail views
- Add recent activity tracking via RecentActivityStore
- Add work and inbox deep link aliases (hutch://work, hutch://inbox)

Implements: https://todo.sr.ht/~ccleberg/hutch/55
</content>
</entry>
<entry>
<title>feat: add power user actions</title>
<updated>2026-04-13T14:57:23+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-13T14:57:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=0e461a382257979037e8927e5f6b468635b0a7fe'/>
<id>urn:sha1:0e461a382257979037e8927e5f6b468635b0a7fe</id>
<content type='text'>
Implements: https://todo.sr.ht/~ccleberg/hutch/52
Implements: https://todo.sr.ht/~ccleberg/hutch/53
Implements: https://todo.sr.ht/~ccleberg/hutch/54
</content>
</entry>
<entry>
<title>feat: add multi-account support</title>
<updated>2026-04-13T04:19:20+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-04-13T04:19:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=ee9f2904aa319231b7047fca3cb069f0c07019cd'/>
<id>urn:sha1:ee9f2904aa319231b7047fca3cb069f0c07019cd</id>
<content type='text'>
Implements: https://todo.sr.ht/~ccleberg/hutch/49
Implements: https://todo.sr.ht/~ccleberg/hutch/50
Implements: https://todo.sr.ht/~ccleberg/hutch/51
</content>
</entry>
</feed>
