summaryrefslogtreecommitdiff
path: root/Hutch/App
Commit message (Collapse)AuthorAgeFilesLines
* chore: track the two HutchIntents TODOs in the roadmap (S1135)Christian Cleberg2026-07-161-2/+4
| | | | | | | | SearchHutchIntent's route-to-Lookup stopgap and the absent OpenSavedSearchIntent are both gated on a global search/persistence layer Hutch lacks. Promote both to ROADMAP § "App Intent gaps" and replace the inline TODOs with plain references, clearing those two S1135 issues without losing the design intent.
* chore: clear the actionable SonarCloud code smellsChristian Cleberg2026-07-161-5/+3
| | | | | | | | | | | | | | | | | | | - S1871: merge the identical .home / .recentActivity deep-link cases in RootView — recent activity is a section of Home, not its own screen. - S1186: comment the two intentionally-empty Cancel buttons (PatchsetDetailView, TicketDetailView) and the empty URLProtocol stopLoading override in APICacheTests. - S108: comment the expected-miss catch block in APICacheTests. - S1172: rename the unused url parameter in mimeType(for:) to _. - S4624: extract the nested template literal in the deep-link builders (background.js, content.js) to a pathSegment variable. Left as Won't Fix, with reasons: the 35 hardcoded-URI warnings (a one-forge client and its literal-URL tests), executeCached's 8 params (38 call sites, no benefit), the forceRefresh S1172 pair (fixed as a real bug instead), S1481 on ArtifactsView (false positive — $vm.error is used), and S7785 (top-level await would break a classic content script).
* chore: move AccountSession.swift out of the stray nested Hutch/Hutch dirChristian Cleberg2026-07-161-0/+32
| | | | | | | | It sat at Hutch/Hutch/App/AccountSession.swift, one level too deep. The target is a PBXFileSystemSynchronizedRootGroup rooted at Hutch/, so the file compiled by path with no pbxproj reference; moving it beside the rest of App/ needs no project-file change. Also removed the emptied Hutch/Hutch tree and the stray empty Hutch/HutchTests dir.
* fix: push mailing lists locally, fix upload menu, drop the events feedChristian Cleberg2026-07-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | Opening a mailing list from More → Projects still blanked. The cause was not in handleTabNavigation: the row called openMailingList and then dismiss(), so a path rebuild and a pop of this very view raced each other. Projects already lives in the More tab, so there is nothing to navigate to — push MailingListDetailView directly, which also lands back on the project rather than on Mailing Lists. Sources and trackers keep routing, because they really do land in other tabs. The upload controls did nothing. Two .confirmationDialog modifiers on one view leave one silently dead, and this view already had one for delete, so the tag picker never presented. It is a Menu now, which also puts the tags one tap away instead of two. The ticket activity feed is removed. todo.sr.ht's root events resolver joins event.participant_id, which references participant(id), against participant.user_id — different id spaces — so it returns an empty list for every user. The rows exist; that join cannot find them. Ticket.events is unaffected because it filters on ticket_id, which is why ticket timelines work. No client can fix this, and a screen that is permanently empty while blaming the token's scopes is worse than no screen. Recorded in SCOPE.md with the query.
* fix: blank mailing list from Projects, swipe flicker, hidden uploadChristian Cleberg2026-07-161-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Three problems from manual testing. Opening a mailing list from More → Projects showed a blank screen, while the same tap on a project pinned to Home worked. handleTabNavigation reset the target path and appended to it two Task.yields later. When the target tab is already on screen — Projects lives under More — the reset starts an animated pop of the view the user is standing on and the appends land mid-animation. From Home the tab actually changes, so the More stack is quiescent and the appends land cleanly. Each case now builds its path and assigns it once, so SwiftUI gets a single diff with nothing to race. Destructive swipe actions made the row vanish and spring back while the confirmation was still up. role: .destructive makes SwiftUI perform the row removal on activation, which allowsFullSwipe: false does not prevent — the report was a tap, not a full swipe. These buttons only record pending state and wait for an answer, so they are plain buttons tinted red instead. Six sites: the two added here, plus trackers, pastes, and tracker ACLs and labels, which had the same flicker already. The artifacts upload control was invisible. It was declared as a toolbar item from a view that is a segment inside RepositoryDetailView's tab switch rather than its own navigation destination, so it never reached the navigation bar. It is a row in the list now, and also an action on the empty state — the overlay covers the list, and a repository with no artifacts is precisely the one that needs uploading.
* feat: add a ticket activity feedChristian Cleberg2026-07-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | todo.sr.ht's root events query returns what the authenticated user is subscribed to or implicated in, newest first, across every tracker including ones they do not own. It was never called, so the only way to notice a reply was to open the ticket. Reuses EventChange, which already decodes todo's polymorphic EventDetail for ticket timelines, so the same inline fragments describe both surfaces. Rows push straight to the ticket. events is nullable and comes back null when the token lacks the EVENTS scope, so that case reports a scope problem rather than an empty feed, which would read as "nothing has happened". Paginates rather than fetching everything: an active account's history is unbounded and the top of it is the whole point. archiveMessage, the other half of this roadmap item, is not here. It is marked @internal in the schema and inaccessible, like revokePersonalAccessToken already recorded in SCOPE.md.
* fix: start a new account at zero unreadChristian Cleberg2026-07-151-0/+3
| | | | | | | | | | | | | | | | | | | 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.
* fix: give inbox threads identity distinct from their grouping keyChristian Cleberg2026-07-151-3/+3
| | | | | | | | | | | | | | | | | 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 App Intents for Hutch navigationChristian Cleberg2026-05-145-95/+640
| | | | | | | | | | - add read-only App Intents for core Hutch workflows - route intents through the existing Hutch navigation/deep-link model - expose Work Queue, Recent Activity, System Status, pinned resources, projects, failed builds, assigned tickets, saved searches, and search where supported - keep App Intents non-mutating for the initial implementation - preserve existing widget, Safari extension, and hutch:// routing behavior References: https://todo.sr.ht/~ccleberg/hutch/71
* feat: add Safari extension for sourcehut deep linksv3.4.0Christian Cleberg2026-05-144-25/+226
|
* feat: add persistent stale-while-revalidate API cacheChristian Cleberg2026-05-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix: profile loading error and user-timeline prefs updatev3.2.1Christian Cleberg2026-04-231-0/+1
|
* feat: user-defined time period for recent builds cardChristian Cleberg2026-04-201-0/+1
| | | | | | | | | - 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
* fix: remove prototype screens from developer menuv3.1.6Christian Cleberg2026-04-141-0/+3
| | | | | | | | - removed prototype screens - limited Recent section to 3 items - added initial support for tips Fixes: https://todo.sr.ht/~ccleberg/hutch/65
* fix: centralize URLs, tighten models, and polish SwiftUI bindingsv3.1.3Christian Cleberg2026-04-132-2/+4
| | | | | | | | | | | | | | | | | | | | - 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(theme): AMOLED true-black rows via themedRow()Christian Cleberg2026-04-133-1/+71
| | | | | | | | | | 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
* feat: redesign paste detail view as full-screen file viewerChristian Cleberg2026-04-131-0/+1
| | | | | | | | | | | | Replaces the list-based layout with a full-screen viewer that matches the repository file tree pattern. File contents are now the primary focus using CodeFileTextView (line numbers, wrap toggle). A compact sticky header shows the filename, visibility badge, owner, date, and abbreviated hash. Paste metadata moves to a Details sheet accessible via the bottom toolbar. Duplicate share buttons are consolidated: link sharing lives in the ··· menu and content sharing is in the toolbar. Fixes: https://todo.sr.ht/~ccleberg/hutch/13
* release: v3.0.0 — navigation overhaul, Work view, and multi-pin supportv3.0.0Christian Cleberg2026-04-135-3/+23
| | | | | | | | | | | | | | | | | | | | 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
* feat: add power user actionsChristian Cleberg2026-04-133-0/+41
| | | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/52 Implements: https://todo.sr.ht/~ccleberg/hutch/53 Implements: https://todo.sr.ht/~ccleberg/hutch/54
* feat: add multi-account supportChristian Cleberg2026-04-123-85/+195
| | | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/49 Implements: https://todo.sr.ht/~ccleberg/hutch/50 Implements: https://todo.sr.ht/~ccleberg/hutch/51
* feat: add search and recent queriesChristian Cleberg2026-04-121-0/+1
| | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/47 Implements: https://todo.sr.ht/~ccleberg/hutch/48
* feat: add ticket saved filters and label filteringChristian Cleberg2026-04-121-0/+2
| | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/32 Implements: https://todo.sr.ht/~ccleberg/hutch/33
* feat: add projects list, detail view, and home pinningChristian Cleberg2026-04-122-0/+4
| | | | | | Implements: https://todo.sr.ht/~ccleberg/hutch/26 Implements: https://todo.sr.ht/~ccleberg/hutch/27 Implements: https://todo.sr.ht/~ccleberg/hutch/28
* feat: add theme and high-density display modesChristian Cleberg2026-04-123-0/+83
| | | | | Refs: https://todo.sr.ht/~ccleberg/hutch/24 Implements: https://todo.sr.ht/~ccleberg/hutch/25
* feat: add builds auto-refresh and repo filteringChristian Cleberg2026-04-121-0/+2
| | | | | implements: https://todo.sr.ht/~ccleberg/hutch/17 implements: https://todo.sr.ht/~ccleberg/hutch/18
* feat: improve Home structure and navigationv2.16.0Christian Cleberg2026-04-123-0/+12
| | | | | | implements: https://todo.sr.ht/~ccleberg/hutch/14 implements: https://todo.sr.ht/~ccleberg/hutch/15 implements: https://todo.sr.ht/~ccleberg/hutch/16
* add shortcuts widgets and power-user workflowsv2.15.0Christian Cleberg2026-04-125-0/+267
|
* improve home attention flows and cross-linkingv2.14.0Christian Cleberg2026-04-121-5/+31
|
* harden system status and app reliabilityv2.13.1Christian Cleberg2026-04-121-0/+2
|
* Add SourceHut system status screen and home disruption bannerChristian Cleberg2026-04-112-1/+23
|
* feat: add contribution calendar to user profilesv2.11.0Christian Cleberg2026-04-114-0/+54
| | | | | | 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: add in-app man pages browserChristian Cleberg2026-04-031-0/+6
| | | | | | | | | | | | | | Add a native Man Pages section to the More tab with in-app browsing for man.sr.ht documentation and srht.site pages. - add ManPageService for fetching and extracting public docs content - add ManPageBrowserView and ManPageDetailView - add More tab navigation for Man Pages - support in-place navigation for internal documentation links - allow HTMLWebView to intercept internal links and use a base URL - support man.sr.ht and srht.site content extraction - remove heading permalink "#" anchors from man page rendering - fix relative links, fragment links, and srht.site CTA/icon layout
* Implement search history for Look Up pageChristian Cleberg2026-04-021-0/+1
|
* feat: add Look Up screen and restrict management actions to ownersv2.8.0Christian Cleberg2026-04-011-0/+3
| | | | Implements: https://todo.sr.ht/~ccleberg/Hutch/4
* standardize nav labelsChristian Cleberg2026-04-011-1/+1
|
* Rewrite file viewer with pinned gutter, syntax highlighting, and toolbarChristian Cleberg2026-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | Replace the SwiftUI-only CodeFileTextView with a UIViewRepresentable backed by CodeFileUIView. The previous approach could not support a fixed line number gutter while independently scrolling code content horizontally. Changes: - Gutter is pinned outside the horizontal scroll view and never scrolls left - Vertical scroll is handled by a single outer UIScrollView shared by both the gutter and code content, keeping them in sync - Line numbers are right-aligned in a fixed-width gutter calculated from the total line count - Syntax highlighting via Splash for .swift files, with plain monospaced rendering as fallback for unsupported file types - Wrap toggle persisted via AppStorage (wrapRepositoryFileLines) - Bottom toolbar replaces the floating Share button, adding Copy All and Wrap toggle actions - Copy All shows a brief checkmark confirmation that resets after 2 seconds - Font fixed at SFMono-Regular 12pt, not scaled with Dynamic Type Implements: https://todo.sr.ht/~ccleberg/Hutch/7
* feat: add multi-account supportv2.6.0Christian Cleberg2026-04-012-7/+94
| | | | Implements: https://todo.sr.ht/~ccleberg/Hutch/11
* v2.4.0: widgetsv2.4.0Christian Cleberg2026-03-243-0/+26
|
* feat: surface an alert when a deep link fails to resolveChristian Cleberg2026-03-222-2/+31
|
* feat: add privacy policy link and global swipe actions toggle to SettingsChristian Cleberg2026-03-221-0/+4
|
* v2.1: bundled polish and fixesChristian Cleberg2026-03-191-14/+16
|
* feat: implement support for projects, lists, and pastesChristian Cleberg2026-03-192-21/+135
|
* feat: add inbox threads and move builds under moreChristian Cleberg2026-03-191-13/+13
|
* feat: add support for reading inbox messages (emails) and replying in-appChristian Cleberg2026-03-192-20/+36
|
* add Home dashboard and repository build status indicatorsChristian Cleberg2026-03-181-2/+13
|
* v1.0Christian Cleberg2026-03-174-0/+493