summaryrefslogtreecommitdiff
path: root/Hutch/Models
Commit message (Collapse)AuthorAgeFilesLines
* feat: show the meta.sr.ht audit logChristian Cleberg2026-07-151-0/+10
| | | | | | | | | | | | | auditLog existed in the API but was never called, so the record of what has happened to your account — logins, key changes, the addresses they came from — was web-only. Sits under the tokens in Profile and loads on demand for the same reason they do: an audit log is something you go looking for, not something worth a request on every profile view. One page, newest first; the archive stays on meta.sr.ht. Its errors are kept separate from the shared `error` so a failed audit fetch cannot bury a profile save failure, and vice versa.
* Merge pull request #5 from zerolabsco/inbox-unread-baselineChristian Cleberg2026-07-151-4/+41
|\ | | | | Start a new account at zero unread
| * fix: start a new account at zero unreadChristian Cleberg2026-07-151-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An absent view record read as unread, so on first sign-in every thread a list had ever carried was unread. On a busy list that is thousands of threads the user never intended to read, inflating the Home dashboard, the needs-attention snapshot, and the widget with a number that means nothing. Record a baseline when an account is activated: mail that predates it is read, mail after it is not. activate() is the single funnel for launch validation, account switching, and adding an account, so one call covers every sign-in path. Accounts that already carry read state have been in use, so they get a distantPast baseline and keep every unread thread they had — upgrading must not silently mark a real backlog as read. markUnread now records an explicit distantPast marker instead of deleting the entry. Deleting would drop the thread back to the baseline rule, so marking an old thread unread would appear to do nothing.
* | refactor: share the email body diff splitterChristian Cleberg2026-07-151-0/+132
|/ | | | | | | | | | | | | segmentMessageBody and its helpers were private to ThreadViewModel, reachable from tests only through a segmentMessageBodyForTesting shim. Patchset review needs the same splitting, because sr.ht's Patch type carries no diff — the diff only exists inside the email body — so this has to be shared rather than duplicated. Moved to InboxThreadUtilities. The shim is gone; the existing test calls the real function directly now. Also adds the Patchset model layer that the coming views build on.
* fix: give inbox threads identity distinct from their grouping keyChristian Cleberg2026-07-151-1/+4
| | | | | | | | | | | | | | | | | InboxThreadSummary.id returned threadGroupingKey, which is listRID plus the subject with Re:/Fwd: stripped. Two unrelated threads on one list sharing a subject therefore shared an id — common on sourcehut, where "[PATCH] test" is an ordinary subject — which collides under Identifiable in every list that renders these summaries. Key id on the root Message-ID, which is unique per thread, and leave threadGroupingKey subject-based so replies still collapse into one conversation. Read state moves to threadGroupingKey at each call site. It was already keyed on that string via id, so persisted keys are unchanged and marking a conversation read still covers the whole subject group, matching how HomeViewModel already builds the key for isUnread.
* feat: add Safari extension for sourcehut deep linksv3.4.0Christian Cleberg2026-05-141-1/+1
|
* fix: profile loading error and user-timeline prefs updatev3.2.1Christian Cleberg2026-04-231-1/+7
|
* fix: collapse work inbox messages into thread summariesv3.2.0Christian Cleberg2026-04-201-1/+1
|
* fix: sonarqube code smell fixesv3.1.4Christian Cleberg2026-04-133-33/+38
|
* fix: centralize URLs, tighten models, and polish SwiftUI bindingsv3.1.3Christian Cleberg2026-04-133-61/+88
| | | | | | | | | | | | | | | | | | | | - 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.
* feat: add ticket label management and bulk actionsChristian Cleberg2026-04-121-0/+88
| | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/45 Implements: https://todo.sr.ht/~ccleberg/hutch/46
* feat: add repo settings managementChristian Cleberg2026-04-121-0/+34
| | | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/42 Implements: https://todo.sr.ht/~ccleberg/hutch/43 Implements: https://todo.sr.ht/~ccleberg/hutch/44
* feat: add repository acl managementChristian Cleberg2026-04-122-1/+21
| | | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/39 Implements: https://todo.sr.ht/~ccleberg/hutch/40 Implements: https://todo.sr.ht/~ccleberg/hutch/41
* feat: polish read-only project views and home integrationChristian Cleberg2026-04-121-0/+106
| | | | | | Refs: https://todo.sr.ht/~ccleberg/hutch/36 Refs: https://todo.sr.ht/~ccleberg/hutch/37 Refs: https://todo.sr.ht/~ccleberg/hutch/38
* feat: add build artifact listingChristian Cleberg2026-04-121-0/+19
| | | | Implements: https://todo.sr.ht/~ccleberg/hutch/31
* feat: add projects list, detail view, and home pinningChristian Cleberg2026-04-121-0/+27
| | | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/26 Implements: https://todo.sr.ht/~ccleberg/hutch/27 Implements: https://todo.sr.ht/~ccleberg/hutch/28
* improve home attention flows and cross-linkingv2.14.0Christian Cleberg2026-04-121-2/+6
|
* Add SourceHut system status screen and home disruption bannerChristian Cleberg2026-04-111-0/+84
|
* feat: add contribution calendar to user profilesv2.11.0Christian Cleberg2026-04-111-0/+340
| | | | | | Add a trailing 365-day contribution heatmap to user profile views, backed by HutchStatsService. Includes calendar model, view model, SwiftUI calendar view, app configuration, and unit tests.
* feat: expand user profile in Look UpChristian Cleberg2026-04-011-0/+9
|
* feat: show commit dates in Refs tabv2.8.1Christian Cleberg2026-04-011-0/+7
|
* Add tracker management (delete/update, ACLs, labels)v2.7.0Christian Cleberg2026-04-011-0/+49
| | | | | | | | | | | | | - Add swipe actions (delete/edit) to tracker list - Add tracker settings menu on detail screen - Implement updateTracker and deleteTracker mutations - Implement ACL management (updateUserACL, updateTrackerACL, deleteACL) - Implement label management (createLabel, updateLabel, deleteLabel) - Add dedicated UI flows for ACLs and labels - Ensure state refresh after mutations - Handle loading, errors, and destructive confirmations Implements: https://todo.sr.ht/~ccleberg/Hutch/12
* fix: ensure projects in Home tab are sorted by last updated dateChristian Cleberg2026-04-011-0/+1
|
* feat: add multi-account supportv2.6.0Christian Cleberg2026-04-011-0/+8
| | | | Implements: https://todo.sr.ht/~ccleberg/Hutch/11
* Add scoped auto-refresh to build detailChristian Cleberg2026-03-231-3/+11
|
* feat: implement support for projects, lists, and pastesChristian Cleberg2026-03-193-1/+131
|
* feat: add inbox threads and move builds under moreChristian Cleberg2026-03-191-0/+6
|
* feat: add support for reading inbox messages (emails) and replying in-appChristian Cleberg2026-03-191-0/+187
|
* stabilize build task identity and log cache keysChristian Cleberg2026-03-181-2/+25
|
* lazily load file blobs from repository tree viewsChristian Cleberg2026-03-181-8/+11
|
* v1.0Christian Cleberg2026-03-179-0/+827