Review of the uncommitted working tree against origin/main. All review fixes are included; no commits or pushes were made.
Needs verification before push
Code findings are fixed. The full Core suite, 1,863 app unit tests, 12 focused iPhone UI tests across runs, identity validation and diff checks passed. A fresh Mac build remains blocked by errSecInternalComponent during share-extension signing; Xcode MCP requires menu-bar approval. The full UI suite was not run.
working-tree Works redesign and pre-push review fixes Works opens on a library home with reading groups, Series, Creators and recently noted works. All works contains the complete library and unattached notes.
Readers can go straight to their queue or current reading. Series show the next unfinished work and reading progress.
A destination is a place in the library; a token is a filter. Progress is derived from existing statuses, without adding stored fields.
WorksGroupView and WorksSearchContent share membership, sorting and row rendering. WorksSearchToken maps onto the existing eight WorksFilter dimensions. SeriesIndexView and SeriesDetailView share SeriesProgress from Core.
Compact navigation pushes destinations before details; wide layouts replace the work-list column. Destination and group sort preferences reset for seeded tests. iOS uses native search tokens with explicit suggestions; Mac uses the column search field with removable tokens. Continue falls back to the primary work URL.
Series ordering compares section before section-specific keys. Last-note dates are computed once per progress value. Token identity uses filter values; label refresh preserves the query. Value vocabularies are built only after a dimension prefix.
No schema, migration or backup format changed. Existing resolution actions, first-sync presentation, selection and series editing remain.
Hub, groups, token search, All works, series fans/detail progress and destination restoration are implemented. Catch-up estimates and status-change timestamps remain deferred. Status groups use truthful last-note fallbacks. Future sidebar layouts are outside this handover.
Asterism/Asterism/Views/WorksView.swift
Why it matters. Status groups, Series, Creators and recent notes replace a long root list.
What to look at. WorksView.hub
Asterism/Asterism/Views/WorksGroupView.swift
Why it matters. Scoped search and per-group sorts retain existing row actions.
What to look at. WorksSearchContent
Asterism/Asterism/ViewModels/WorksSearchToken.swift
Why it matters. Colliding names and renames no longer confuse token identity.
What to look at. WorksSearchToken.id / values / refreshed
Packages/AsterismCore/Sources/AsterismCore/SeriesProgress.swift
Why it matters. Next up, cover selection and section ordering share one pure model.
What to look at. SeriesProgress.build / precedes
Asterism/Asterism/Support/PlatformModifiers.swift
Why it matters. Tapping a dimension keeps its value suggestions accessible.
What to look at. WorksTokenSearch
The user requested schema changes be marked for later. Last-note fallbacks describe available data rather than inventing status timestamps or catch-up estimates.
Existing extraction rules do not provide a reverse next-chapter URL builder. This is the handover’s documented fallback.
They appear under Not started and never claim completion; abandoned members are skipped for Next up.
Default suggestion selection dismissed the next level. The two-stage UI journey passed with plain dimension buttons; final-value selection retains normal completion behavior.
| Severity | Area | Finding | Resolution |
|---|---|---|---|
| major | Series ordering | Mixed-section date/name comparisons were nontransitive. | Compare sections first, then last-note dates for In progress and names otherwise. |
| major | Search token identity | Labels collided with sentinel labels such as No series and Untyped. | Use filter-value identities, with distinct named and untyped cases. |
| major | Token label refresh | Renamed series, creators or sites retained stale selected-token text. | Refresh surviving token labels without clearing the typed query. |
| major | Cover fallback | Removing a loaded cover could leave its initials fallback hidden. | Gate the drawn state on the continued presence of a thumbnail. |
| major | Fallback sort labels | Labels claimed pause, completion or catch-up dates that the model does not contain. | Describe the implemented last-note ordering explicitly. |
| major | Dimension suggestions | An empty field stopped suggesting dimensions after one token; selecting a dimension dismissed the values panel. | Always offer applicable dimensions and use plain buttons for dimension navigation. |
| major | Search and progress work | Suggestion labels used quadratic lookups; series sorting repeatedly scanned notes. | Reuse option labels, lazily construct values, derive last-note dates once and build progress once per section set. |
Source: local run at 2026-09-25T21:39:14.597820+10:00 · snapshot d0596e794214d8def65eb0a2a360b1554a4c2a22 (dirty working tree)
Baseline: none
Execution: passed · JUnit: none · Coverage: none · Baseline: absent
Coverage scope: as the project configures it
The test runner could not be detected.
Derived by declaration name, from the diff (no baseline run).
Files that import a changed file on the left, changed files in the centre, files a changed file imports on the right. Snapshot working-tree against base origin/main.
48 files: 43 code · 5 docs. Click to expand.
diff --git a/Asterism/Asterism/ContentView.swift b/Asterism/Asterism/ContentView.swiftindex b3160439..bacfe010 100644--- a/Asterism/Asterism/ContentView.swift+++ b/Asterism/Asterism/ContentView.swift@@ -88,6 +88,8 @@ struct ContentView: View { /// but the Mac: Req 7.2 leaves the iPad's launch behaviour alone, so the /// mirror and the restore are both gated on `RuntimePlatform.isMac` rather /// than forked with a conditional that would have to wrap four modifiers.+ @AppStorage(RestoreStorageKey.worksDestination) private var storedWorksDestination = ""+ @State private var restoredWorksDestination = false @AppStorage(RestoreStorageKey.selectedTab) private var storedTab = AppTab.today.rawValue @AppStorage(RestoreStorageKey.selectedTodayEntryID) private var storedTodayEntryID = "" @AppStorage(RestoreStorageKey.selectedWorkID) private var storedWorkID = ""@@ -371,7 +373,27 @@ struct ContentView: View { // Before the bootstrap rather than after it, so the reader's place is // already set when the first snapshot arrives and the detail column // never flashes a placeholder it is about to replace.- .onAppear(perform: restoreSelection)+ .onAppear {+ restoreSelection()+ if !restoredWorksDestination {+ restoredWorksDestination = true+ if let destination = WorksDestination(storedValue: storedWorksDestination) {+ navigation.worksPath.insert(.destination(destination), at: 0)+ }+ }+ }+ .onChange(of: navigation.worksPath) { _, path in+ guard usesCompactTree else { return }+ if let destination = path.compactMap({ route -> WorksDestination? in+ switch route {+ case .destination(let value): value+ case .seriesList: .seriesIndex+ case .creatorList: .creators+ default: nil+ }+ }).last { storedWorksDestination = destination.storageValue }+ else if path.isEmpty { storedWorksDestination = "" }+ } .task { await model.bootstrap() }@@ -619,8 +641,14 @@ struct ContentView: View { // the sheets are attached outside it, so what they present is // tinted exactly as it was before. .tint(AsterismColors.cyan)+ .sheet(isPresented: Binding(get: { navigation.statusWorkID != nil },+ set: { if !$0 { navigation.statusWorkID = nil } })) {+ if let id = navigation.statusWorkID, let detail = model.workDetailModel(for: id) {+ WorksStatusSheet(model: detail)+ }+ } .sheet(isPresented: $navigation.showingNewWork) {- if let newWorkModel = model.newWorkModel() {+ if let newWorkModel = model.newWorkModel(readingStatus: navigation.newWorkReadingStatus) { NewWorkView(model: newWorkModel) } }@@ -808,7 +836,7 @@ struct ContentView: View { // while the list is behind the works-load gate. worksLoaded: model.worksLoad == .loaded, subject: subject,- newWork: { navigation.showingNewWork = true },+ newWork: { navigation.newWorkReadingStatus = .toRead; navigation.showingNewWork = true }, find: navigation.requestSearchFocus, export: { startCommandExport(subject) }, toggleSidebar: navigation.toggleSidebar,
diff --git a/Asterism/Asterism/Layout/AppNavigation.swift b/Asterism/Asterism/Layout/AppNavigation.swiftindex a43f52b2..d7dcdf29 100644--- a/Asterism/Asterism/Layout/AppNavigation.swift+++ b/Asterism/Asterism/Layout/AppNavigation.swift@@ -176,7 +176,7 @@ final class AppNavigation { switch worksPath.last { case .work(let workID): workID case .chapter: selectedWorkID- case .series, .seriesList, .creator, .creatorList, .none: nil+ case .destination, .series, .seriesList, .creator, .creatorList, .none: nil } } @@ -276,6 +276,8 @@ final class AppNavigation { // MARK: - Sheets var showingNewWork = false+ var newWorkReadingStatus: ReadingStatus = .toRead+ var statusWorkID: UUID? var showingMoveTo: UUID? var showingSettings = false var showingTeachingForEntryID: UUID?@@ -834,6 +836,7 @@ nonisolated enum WorksRoute: Hashable, Sendable { case work(UUID) /// An entry opened from a work's chapter list. Only ever after a `.work`. case chapter(entryID: UUID)+ case destination(WorksDestination) case seriesList /// A series screen, and the work it was opened from where there is one: /// Req 3.3's "Current work" marker is that field.@@ -848,6 +851,10 @@ nonisolated enum WorksRoute: Hashable, Sendable { /// "the work this route belongs to": a chapter has one and deliberately /// answers nil, because the two questions have different answers and only /// the stack knows the second.+ var isWorkListDestination: Bool {+ if case .destination(let destination) = self { destination.isWorkList } else { false }+ }+ var workID: UUID? { if case .work(let workID) = self { workID } else { nil } }
diff --git a/Asterism/Asterism/Layout/AppScreens.swift b/Asterism/Asterism/Layout/AppScreens.swiftindex 02279d38..d6c2f923 100644--- a/Asterism/Asterism/Layout/AppScreens.swift+++ b/Asterism/Asterism/Layout/AppScreens.swift@@ -146,6 +146,13 @@ struct AppScreens { @ViewBuilder func route(_ route: WorksRoute, on stack: RouteStack) -> some View { switch route {+ case .destination(let destination):+ switch destination {+ case .group(let group): WorksGroupView(library: worksList(), group: group)+ case .allWorks: WorksGroupView(library: worksList(), group: nil)+ case .seriesIndex: seriesList(on: stack)+ case .creators: creatorList(on: stack)+ } case .work(let workID): workDetail(workID, on: stack) case .chapter(let entryID):@@ -180,7 +187,7 @@ struct AppScreens { } } - private func worksList() -> some View {+ private func worksList() -> WorksView { WorksView( snapshot: model.worksSnapshot, duplicateWorkload: model.todayPresentation.duplicateWorkload,@@ -202,12 +209,32 @@ struct AppScreens { // shape, and a request made on another tab must not focus this one. searchFocusRequest: navigation.searchFocusRequest(for: .works), showsSky: showsSky,- // `showWork` clears the other routes this column can be showing. In- // the compact tree those are already nil at the Works root, so it is- // the same act there — one spelling rather than two.- onSelectWork: { navigation.showWork($0) },- onSelectEntry: navigation.showWorksEntry,- onNewWork: { navigation.showingNewWork = true },+ isWide: isWide,+ directoryModel: model.seriesListModel(),+ creatorModel: model.creatorListModel(),+ snapshotGeneration: model.snapshotGeneration,+ onReturnToHub: { navigation.worksPath.removeAll { $0.isWorkListDestination } },+ onSelectDestination: { destination in+ if isWide {+ navigation.worksPath.removeAll { $0.isWorkListDestination }+ navigation.worksPath.insert(.destination(destination), at: 0)+ } else { navigation.worksPath.append(.destination(destination)) }+ },+ onChangeStatus: { navigation.statusWorkID = $0 },+ // A list selection replaces the wide detail while retaining its+ // library destination for compact navigation and restoration.+ onSelectWork: { id in+ if isWide {+ let destination = navigation.worksPath.first(where: { $0.isWorkListDestination })+ navigation.showWork(id)+ if let destination { navigation.worksPath.insert(destination, at: 0) }+ } else { navigation.pushWork(id) }+ },+ onSelectEntry: { id in+ if isWide { navigation.worksPath.removeAll { !$0.isWorkListDestination } }+ navigation.worksPath.append(.chapter(entryID: id))+ },+ onNewWork: { navigation.newWorkReadingStatus = $0; navigation.showingNewWork = true }, // Req 4.4: the header pushes the series onto the Works stack with // no origin — Req 3.3's "Current work" marker belongs to a series // opened *from* a work, and this one was opened from the list.@@ -281,11 +308,12 @@ struct AppScreens { @ViewBuilder func seriesList(on stack: RouteStack) -> some View { if let listModel = model.seriesListModel() {- SeriesListView(+ SeriesIndexView( model: listModel, // Read here, in the tree's body, so a sync arrival that bumps it // reaches the screen's `.task(id:)` (Req 11.2). snapshotGeneration: model.snapshotGeneration,+ works: model.worksSnapshot.works, showsSky: showsSky, // No origin: Req 3.3's "Current work" marker belongs to a series // opened *from* a work, and this one was opened from the list.
diff --git a/Asterism/Asterism/Layout/WideRootView.swift b/Asterism/Asterism/Layout/WideRootView.swiftindex 14fc7a34..9b53a642 100644--- a/Asterism/Asterism/Layout/WideRootView.swift+++ b/Asterism/Asterism/Layout/WideRootView.swift@@ -232,7 +232,7 @@ struct WideRootView: View { private func stackDetail( on stack: RouteStack, entryID: UUID?, placeholder: DetailPlaceholder ) -> some View {- if let route = navigation.path(on: stack).last {+ if let route = navigation.path(on: stack).last, !route.isWorkListDestination { if drawsBackButton(route, on: stack) { stackedRoute(on: stack, measure: Self.measure(for: route)) { screens.route(route, on: stack)@@ -296,6 +296,8 @@ struct WideRootView: View { switch navigation.path(on: stack).dropLast().last { case .work(let workID): return model.workTitlesByID[workID] ?? "Work"+ case .destination(let destination):+ return destination.title case .series, .seriesList: return "Series" case .creatorList:@@ -334,6 +336,8 @@ struct WideRootView: View { return model.workTitlesByID[workID] case .chapter(let entryID): return entryTitle(entryID)+ case .destination(let destination):+ return destination.title case .seriesList, .series: // The screen names itself in its navigation title, from the label // Core composed; the route alone carries an identifier and no name,
diff --git a/Asterism/Asterism/Support/PlatformModifiers.swift b/Asterism/Asterism/Support/PlatformModifiers.swiftindex c3b1fe15..519eec81 100644--- a/Asterism/Asterism/Support/PlatformModifiers.swift+++ b/Asterism/Asterism/Support/PlatformModifiers.swift@@ -922,3 +922,78 @@ extension View { #endif } }++// MARK: - Works token search++extension View {+ func insetGroupedListStyle() -> some View {+ #if os(iOS)+ return listStyle(.insetGrouped)+ #else+ return self+ #endif+ }+}++/// Native tokens on iOS and an in-column search control on macOS.+struct WorksTokenSearch: ViewModifier {+ @Binding var text: String+ @Binding var tokens: [WorksSearchToken]+ let suggestions: [WorksSearchToken]+ let prompt: String+ let focusRequest: Int+ @FocusState private var focused: Bool++ func body(content: Content) -> some View {+ #if os(iOS)+ content+ .searchable(text: $text, tokens: $tokens,+ placement: .navigationBarDrawer(displayMode: .always), prompt: prompt) { token in+ Text(token.label)+ }+ .searchSuggestions {+ ForEach(suggestions) { token in+ if token.isDimension {+ // A dimension opens another level of suggestions. The+ // automatic suggestion style dismisses that panel.+ Button(token.label) { text = token.dimension.rawValue + ":" }+ .buttonStyle(.plain)+ } else {+ Button(token.label) {+ tokens.append(token)+ text = ""+ focused = false+ }+ }+ }+ }+ .searchFocused($focused)+ .onChange(of: focusRequest) { _, _ in focused = true }+ #else+ VStack(spacing: 8) {+ ColumnSearchField(text: $text, prompt: prompt, isFocused: $focused)+ .accessibilityIdentifier("works-group-search")+ if !tokens.isEmpty {+ FlowLayout(spacing: 6) {+ ForEach(tokens) { token in+ Button { tokens.removeAll { $0.id == token.id } } label: {+ Label(token.label, systemImage: "xmark.circle.fill").constellationPill(.genreTag)+ }.buttonStyle(.plain).accessibilityLabel("Remove \(token.label)")+ }+ }.padding(.horizontal)+ }+ if focused {+ ScrollView(.horizontal) {+ HStack {+ ForEach(suggestions) { token in+ Button(token.label) { tokens.append(token) }+ .buttonStyle(.bordered)+ }+ }+ }.padding(.horizontal)+ }+ content+ }.onChange(of: focusRequest) { _, _ in focused = true }+ #endif+ }+}
diff --git a/Asterism/Asterism/Support/UITestMarker.swift b/Asterism/Asterism/Support/UITestMarker.swiftindex 220d9ca0..7a38cd2c 100644--- a/Asterism/Asterism/Support/UITestMarker.swift+++ b/Asterism/Asterism/Support/UITestMarker.swift@@ -71,6 +71,7 @@ enum LayoutMarker { /// the restore reads them in another, and a typo in either is a restore that /// silently never happens. enum RestoreStorageKey {+ static let worksDestination = "restore.worksDestination" static let selectedTab = "restore.selectedTab" /// `update-schedule` Q42: Today's entry selection is the only Today value /// restored. `todayPath` starts empty on every launch, so there is no third
diff --git a/Asterism/Asterism/ViewModels/AppLibraryModel.swift b/Asterism/Asterism/ViewModels/AppLibraryModel.swiftindex fb3544e3..16a204b5 100644--- a/Asterism/Asterism/ViewModels/AppLibraryModel.swift+++ b/Asterism/Asterism/ViewModels/AppLibraryModel.swift@@ -1626,9 +1626,9 @@ public final class AppLibraryModel { } /// Provides a model for creating a new work.- public func newWorkModel() -> NewWorkFormModel? {+ public func newWorkModel(readingStatus: ReadingStatus = .toRead) -> NewWorkFormModel? { guard let repo = repository else { return nil }- return NewWorkFormModel(library: repo, onMutation: { [weak self] in+ return NewWorkFormModel(library: repo, initialReadingStatus: readingStatus, onMutation: { [weak self] in await self?.refreshDiagnosesAndSnapshots() }) }
diff --git a/Asterism/Asterism/ViewModels/NewWorkFormModel.swift b/Asterism/Asterism/ViewModels/NewWorkFormModel.swiftindex 8743320a..d552e5f5 100644--- a/Asterism/Asterism/ViewModels/NewWorkFormModel.swift+++ b/Asterism/Asterism/ViewModels/NewWorkFormModel.swift@@ -23,9 +23,11 @@ public final class NewWorkFormModel { private let library: any LibraryProviding private let onMutation: @Sendable () async -> Void private var isSubmitting = false+ private let initialReadingStatus: ReadingStatus - public init(library: any LibraryProviding, onMutation: @escaping @Sendable () async -> Void) {+ public init(library: any LibraryProviding, initialReadingStatus: ReadingStatus = .toRead, onMutation: @escaping @Sendable () async -> Void) { self.library = library+ self.initialReadingStatus = initialReadingStatus self.onMutation = onMutation } @@ -36,11 +38,10 @@ public final class NewWorkFormModel { state = .submitting errorMessage = nil do {- // `to-read` Req 2.1: a work added by hand has no entries, so the- // reader has not started it. The form offers no status control and- // this is the only production caller that names one (Q5, Q15).+ // Manual additions default to To read; a Catching up destination+ // supplies its status without requiring another field in the form. let draft = NewWorkDraft(- displayTitle: draftTitle, hostname: draftHostname, readingStatus: .toRead)+ displayTitle: draftTitle, hostname: draftHostname, readingStatus: initialReadingStatus) let result = try await library.createWork(draft) await onMutation() state = .created(result)
diff --git a/Asterism/Asterism/ViewModels/WorksListOptions.swift b/Asterism/Asterism/ViewModels/WorksListOptions.swiftindex 238bd937..d8cbd940 100644--- a/Asterism/Asterism/ViewModels/WorksListOptions.swift+++ b/Asterism/Asterism/ViewModels/WorksListOptions.swift@@ -27,12 +27,6 @@ import Foundation enum WorksListStorageKey { static let sort = "worksList.sort" - /// Whether the list draws one section per series (Req 4.3 of- /// `series-and-related-works`). Beside the sort, and persisted for its- /// reason: how the whole library is arranged is a preference, not a- /// question the reader is asking now.- static let groupBySeries = "worksList.groupBySeries"- /// What a seeded UI-test launch clears (Q8, and Q51 of /// `series-and-related-works`). ///@@ -41,7 +35,8 @@ enum WorksListStorageKey { /// App Group — so this is the seam the test pins, and a preference added /// later that is not reset is a visible omission here rather than a /// forgotten line there.- static let seededLaunchResets = [sort, groupBySeries]+ static let seededLaunchResets = [sort, RestoreStorageKey.worksDestination]+ + WorksGroup.allCases.map { "worksGroup.sort." + $0.rawValue } } /// The reader's order over the Works list (Reqs 1-3, Q11).@@ -680,7 +675,6 @@ nonisolated enum WorksFilterPresentation { } } - static let groupBySeriesRowIdentifier = "works-list-group-by-series" /// The header of one series section: the series' label and the number of /// its members the list is currently showing.@@ -738,48 +732,9 @@ nonisolated enum WorksFilterPresentation { /// Two cases rather than a header string: only a series section navigates /// anywhere, and only a series section has an identity the reader can act on. nonisolated enum WorksSection: Equatable, Sendable, Identifiable {- /// A series with at least one visible member, its members in- /// `SeriesMemberOrdering` and **not** partitioned by the abandoned rule —- /// a series reads in its own order or it is not a series.- case series(SeriesDisplay, [WorkSnapshot])- /// Works in no series, or in one that has not arrived. Under the toggle it- /// is the run after the last series; with the toggle off it is the whole- /// list, and the header goes with it. Two of these under a date sort: the- /// second holds the empty works, exactly as the list has always split them.- ///- /// `isLeading` marks the first of the run — the one that carries the- /// "No series" header while the toggle is on. Carried rather than recomputed- /// by the view, which had been rescanning the sections before each one. case noSeries([WorkSnapshot], isLeading: Bool)-- var works: [WorkSnapshot] {- switch self {- case .series(_, let works), .noSeries(let works, _): works- }- }-- var seriesDisplay: SeriesDisplay? {- if case .series(let display, _) = self { return display }- return nil- }-- /// True on the first of the No series run's sections, which is where its- /// header goes (Req 4.3). False on every series section.- var isLeadingWithoutSeries: Bool {- if case .noSeries(_, let isLeading) = self { return isLeading }- return false- }-- /// Stable across a filter or a toggle change, which the array offset the- /// list used to iterate on was not: a series section and a No series section- /// swapped identity the moment a filter changed how many series had visible- /// members, and SwiftUI reused one's rows for the other.- var id: String {- switch self {- case .series(let display, _): "series-\(display.id.uuidString)"- case .noSeries(_, let isLeading): isLeading ? "no-series" : "no-series-empty"- }- }+ var works: [WorkSnapshot] { switch self { case .noSeries(let works, _): works } }+ var id: String { switch self { case .noSeries(_, let leading): leading ? "works" : "empty-works" } } } /// How the narrowed works become the list's sections (Req 4.3).@@ -791,26 +746,7 @@ nonisolated enum WorksSection: Equatable, Sendable, Identifiable { /// reader's sort, and only the No series run pays for `sort.apply`. nonisolated enum WorksGrouping { - /// With `groupBySeries` off this is exactly the partition the list has- /// always drawn, so an ungrouped list is byte-for-byte the list it was.- static func sections(- _ works: [WorkSnapshot], sort: WorksSort, groupBySeries: Bool- ) -> [WorksSection] {- guard groupBySeries else { return ungrouped(works, sort: sort) }- // Core owns the bucketing so the section order and the member order are- // `SeriesOrdering` and `SeriesMemberOrdering` themselves rather than a- // second spelling of them — and so the package suite can time it.- let (buckets, rest) = SeriesGrouping.buckets(works)- return buckets.map { WorksSection.series($0.series, $0.works) }- + ungrouped(rest, sort: sort)- }-- /// The existing partition: the sort, then `sectionsEmptyWorks`' split.- ///- /// Run over the No series run as well as over the whole list, which is what- /// Req 4.3's "partitioned and ordered exactly as the ungrouped list is"- /// asks for — the abandoned rule and the empty-works section included.- private static func ungrouped(_ works: [WorkSnapshot], sort: WorksSort) -> [WorksSection] {+ static func ungrouped(_ works: [WorkSnapshot], sort: WorksSort) -> [WorksSection] { let sorted = sort.apply(to: works) guard sort.sectionsEmptyWorks else { return sorted.isEmpty ? [] : [.noSeries(sorted, isLeading: true)]@@ -849,3 +785,165 @@ nonisolated enum SeriesPresentation { return display.label + " · " + SeriesPosition.format(membership.position, locale: locale) } }++// MARK: - Library destinations++nonisolated enum WorksDestination: Hashable, Sendable {+ case group(WorksGroup)+ case allWorks+ case seriesIndex+ case creators++ var isWorkList: Bool {+ switch self {+ case .group, .allWorks: true+ case .seriesIndex, .creators: false+ }+ }++ var title: String {+ switch self {+ case .group(let group): group.title+ case .allWorks: "All works"+ case .seriesIndex: "Series"+ case .creators: "Creators"+ }+ }++ init?(storedValue: String) {+ if let group = WorksGroup(rawValue: storedValue) { self = .group(group) }+ else {+ switch storedValue {+ case "allWorks": self = .allWorks+ case "series": self = .seriesIndex+ case "creators": self = .creators+ default: return nil+ }+ }+ }++ var storageValue: String {+ switch self {+ case .group(let group): group.rawValue+ case .allWorks: "allWorks"+ case .seriesIndex: "series"+ case .creators: "creators"+ }+ }+}++nonisolated enum WorksGroup: String, CaseIterable, Hashable, Sendable {+ case catchingUp, reading, toRead, onHiatus, finished, abandoned++ var title: String {+ switch self {+ case .catchingUp: "Catching up"+ case .reading: "Reading"+ case .toRead: "To read"+ case .onHiatus: "On hiatus"+ case .finished: "Finished"+ case .abandoned: "Abandoned"+ }+ }++ var defaultSortPhrase: String {+ switch self {+ case .catchingUp: "last noted first"+ case .reading: "last noted first"+ case .toRead: "oldest added first"+ case .onHiatus: "oldest note first"+ case .finished: "last noted first"+ case .abandoned: "last noted first"+ }+ }++ var initialReadingStatus: ReadingStatus { self == .catchingUp ? .catchingUp : .toRead }++ func members(of works: [WorkSnapshot]) -> [WorkSnapshot] {+ works.filter { work in+ switch self {+ case .catchingUp: work.readingStatus == .catchingUp+ case .reading: work.readingStatus == .reading && work.workStatus != .hiatus+ case .toRead: work.readingStatus == .toRead+ case .onHiatus: work.workStatus == .hiatus+ && [.reading, .catchingUp].contains(work.readingStatus)+ case .finished: work.readingStatus == .finished+ case .abandoned: work.readingStatus == .abandoned+ }+ }+ }++ func sorted(_ works: [WorkSnapshot], by override: WorksGroupSort = .groupDefault) -> [WorkSnapshot] {+ switch override {+ case .aToZ: return works.sorted(by: WorkSnapshot.titleOrder)+ case .newestAdded: return works.sorted { dateOrder($0, $1, date: { $0.createdAt }, ascending: false) }+ case .groupDefault:+ switch self {+ case .toRead: return works.sorted { dateOrder($0, $1, date: { $0.createdAt }, ascending: true) }+ case .onHiatus: return works.sorted { dateOrder($0, $1, date: WorksRowDetail.lastNoted, ascending: true) }+ case .finished, .abandoned:+ return works.sorted { dateOrder($0, $1, date: WorksRowDetail.lastNoted, ascending: false) }+ case .reading, .catchingUp: return works+ }+ }+ }++ private func dateOrder(+ _ a: WorkSnapshot, _ b: WorkSnapshot, date: (WorkSnapshot) -> Date?, ascending: Bool+ ) -> Bool {+ switch (date(a), date(b)) {+ case let (left?, right?) where left != right: return ascending ? left < right : left > right+ case (_?, nil): return true+ case (nil, _?): return false+ default: return WorkSnapshot.titleOrder(a, b)+ }+ }++ func detail(for work: WorkSnapshot, site: String, now: Date = .now) -> String {+ let noted = WorksRowDetail.noted(work, now: now)+ switch self {+ case .reading: return noted+ case .catchingUp: return noted + " · Latest unknown"+ case .toRead: return [site, "added " + work.createdAt.formatted(.dateTime.day().month(.abbreviated))]+ .filter { !$0.isEmpty }.joined(separator: " · ")+ case .onHiatus: return noted+ case .finished, .abandoned:+ // Status dates require a schema change. Never label a note date as a status change.+ let verdict = self == .abandoned ? work.verdict.components(separatedBy: .newlines).first ?? "" : ""+ return [noted, verdict].filter { !$0.isEmpty }.joined(separator: " · ")+ }+ }+}++nonisolated enum WorksGroupSort: String, CaseIterable, Sendable {+ case groupDefault, aToZ, newestAdded+ func label(group: WorksGroup) -> String {+ switch self {+ case .groupDefault: group.defaultSortPhrase.capitalized+ case .aToZ: "A to Z"+ case .newestAdded: "Newest added"+ }+ }+}++nonisolated enum WorksRowDetail {+ static func lastNoted(_ work: WorkSnapshot) -> Date? { work.entries.map(\.lastSharedAt).max() }+ static func noted(_ work: WorkSnapshot, now: Date = .now, calendar: Calendar = .current) -> String {+ guard let entry = work.entries.max(by: { $0.lastSharedAt < $1.lastSharedAt }) else { return "Not noted yet" }+ let when = calendar.isDate(entry.lastSharedAt, inSameDayAs: now)+ ? entry.lastSharedAt.formatted(date: .omitted, time: .shortened)+ : ReleaseLineText.relativeDay(RelativeDay(noted: CivilDay(entry.lastSharedAt, calendar: calendar),+ selected: CivilDay(now, calendar: calendar), calendar: calendar), calendar: calendar)+ let chapter = entry.chapterTitle ?? entry.chapterSequence+ return [chapter.map { "Last noted \($0)" } ?? "Last noted", when].joined(separator: " · ")+ }+ static func releasesToday(_ work: WorkSnapshot, now: Date = .now, calendar: Calendar = .current) -> Bool {+ TodaySchedule.admits(readingStatus: work.readingStatus, workStatus: work.workStatus,+ releaseDays: work.releaseDays) == .scheduled+ && work.releaseDays.contains(CivilDay(now, calendar: calendar).weekday(calendar: calendar))+ }+ static func isNewToday(_ work: WorkSnapshot, now: Date = .now, calendar: Calendar = .current) -> Bool {+ releasesToday(work, now: now, calendar: calendar)+ && !work.entries.contains { calendar.isDate($0.lastSharedAt, inSameDayAs: now) }+ }+}
diff --git a/Asterism/Asterism/Views/SeriesDetailView.swift b/Asterism/Asterism/Views/SeriesDetailView.swiftindex 298427b9..f5d1223d 100644--- a/Asterism/Asterism/Views/SeriesDetailView.swift+++ b/Asterism/Asterism/Views/SeriesDetailView.swift@@ -20,6 +20,9 @@ struct SeriesDetailView: View { /// (Decision 7), so leaving is too. let onDeleted: () -> Void + @Environment(\.openURL) private var openURL+ @Environment(\.siteNames) private var siteNames+ @State private var isPresentingPicker = false /// Bumped by a save that ended in a refusal, so the screen scrolls to it /// even when it is the same refusal, in the same place, as the last one.@@ -109,6 +112,7 @@ struct SeriesDetailView: View { .accessibilityIdentifier("series-detail-error") case .ready: headerSection+ if !model.isEditing { progressSection } membersSection if model.isEditing { manageSection } }@@ -196,12 +200,20 @@ struct SeriesDetailView: View { VStack(alignment: .leading, spacing: 12) { // No `lineLimit`: this is the one place the whole label is // readable, qualifier and all (Req 1.3).+ if let progress {+ SeriesCoverFan(covers: progress.covers, memberCount: progress.members.count, size: 124)+ .frame(maxWidth: .infinity)+ .accessibilityIdentifier("series-detail-fan")+ } Text(model.title)- .font(AsterismTypography.serifHeading)+ .font(AsterismTypography.serif(.title)) .foregroundStyle(AsterismColors.primaryText) .fixedSize(horizontal: false, vertical: true)- .frame(maxWidth: .infinity, alignment: .leading)+ .frame(maxWidth: .infinity, alignment: .center)+ .multilineTextAlignment(.center) .accessibilityIdentifier("series-detail-title")+ Text(metaLine).font(.caption).foregroundStyle(AsterismColors.secondaryText)+ .frame(maxWidth: .infinity).multilineTextAlignment(.center) // Q7: the reading-order caveats that belong to the set. // Absent when there are none — an empty field on a read@@ -223,6 +235,76 @@ struct SeriesDetailView: View { } } + private var progress: SeriesProgress? {+ model.display.map { SeriesProgress.build(series: $0, members: model.members.map(\.work)) }+ }++ private var metaLine: String {+ let works = model.members.map(\.work)+ let creators = Set(works.flatMap(\.credits).filter { $0.creator.isResolved }.map { $0.creator.label }).sorted()+ let sites = Set(works.flatMap(\.hostnames)).sorted().map { siteNames.label(for: $0) }+ return ([Pluralisation.count(works.count, "work", "works")] + creators + sites).joined(separator: " · ")+ }++ @ViewBuilder private var progressSection: some View {+ if let progress, !progress.members.isEmpty {+ VStack(spacing: 8) {+ SeriesProgressSegments(members: progress.members, height: 6)+ HStack {+ let reading = progress.members.filter { [.reading, .catchingUp].contains($0.readingStatus) }.count+ Text("\(progress.finishedCount) finished · \(reading) reading")+ Spacer()+ Text("\(progress.members.filter { $0.readingStatus == .toRead }.count) to read")+ }.font(.caption).foregroundStyle(AsterismColors.secondaryText)+ }.constellationListRow()+ .accessibilityIdentifier("series-detail-progress")+ if let next = progress.nextUp {+ nextUpCard(next).constellationListRow()+ }+ }+ }++ private func nextUpCard(_ work: WorkSnapshot) -> some View {+ VStack(alignment: .leading, spacing: 12) {+ let position = work.membership.map { SeriesPosition.format($0.position, locale: .current) } ?? ""+ ConstellationSectionHeader("Next up · Book " + position, accent: .cyan)+ Text(work.displayTitle).font(AsterismTypography.serifHeading)+ Text(WorksRowDetail.noted(work)).font(.caption).foregroundStyle(AsterismColors.secondaryText)+ Button {+ if let url = continueURL(work) { openURL(url) }+ } label: {+ Label(continueLabel(work), systemImage: "arrow.up.right")+ }+ .buttonStyle(ConstellationPrimaryButtonStyle())+ .disabled(continueURL(work) == nil)+ .accessibilityIdentifier("series-detail-continue")+ }.padding(16).constellationCard()+ .accessibilityElement(children: .contain)+ .accessibilityIdentifier("series-detail-next-up")+ }++ private func continueLabel(_ work: WorkSnapshot) -> String {+ if work.entries.isEmpty { return "Start" }+ return SeriesProgress.nextChapter(in: work).map { "Continue at Ch \($0)" } ?? "Continue"+ }++ private func continueURL(_ work: WorkSnapshot) -> URL? {+ // Extraction rules are not reversible URL templates. Use the handover's+ // primary-URL fallback until a next-chapter URL builder is available.+ guard let raw = work.memberships.first?.workURLString, let url = URL(string: raw),+ ["https", "http"].contains(url.scheme?.lowercased() ?? "") else { return nil }+ return url+ }++ private func memberStatus(_ work: WorkSnapshot) -> String {+ let status = ReadingStatusPresentation.name(work.readingStatus)+ if work.readingStatus == .toRead && work.entries.isEmpty { return status + " · not started" }+ if work.readingStatus == .finished {+ return status + " · " + Pluralisation.count(work.entries.count, "note", "notes")+ }+ return status + " · " + WorksRowDetail.noted(work)+ }+ // MARK: - Members (Reqs 3.1–3.3, 2.5, 2.6) @ViewBuilder@@ -252,7 +334,11 @@ struct SeriesDetailView: View { .accessibilityIdentifier("series-detail-add-member") } } header: {- ConstellationSectionHeader("Works", accent: .violet)+ HStack {+ ConstellationSectionHeader("Reading order", accent: .violet)+ Spacer()+ if !model.isEditing { Button("Edit") { model.beginEditing() } }+ } } } @@ -266,10 +352,19 @@ struct SeriesDetailView: View { } label: { HStack(alignment: .top, spacing: 10) { Text(row.positionText)- .font(.caption)+ .font(AsterismTypography.serif(.title2))+ .frame(width: 30, alignment: .trailing) .foregroundStyle(AsterismColors.secondaryText) .accessibilityIdentifier("series-member-position")- WorkRow(work: row.work, showsSeries: false)+ WorkThumbnailView(work: row.work, size: CGSize(width: 34, height: 48))+ .opacity(row.work.readingStatus == .finished ? 0.7 : 1)+ VStack(alignment: .leading, spacing: 4) {+ Text(row.work.displayTitle).font(AsterismTypography.serifRowTitle).lineLimit(1)+ Text(memberStatus(row.work)).font(.caption)+ .foregroundStyle(row.work.readingStatus == .reading || row.work.readingStatus == .catchingUp+ ? AsterismColors.cyan : AsterismColors.secondaryText)+ }+ Spacer(minLength: 0) if row.isCurrent { // Req 3.3: the work this screen was opened from. Image(systemName: "checkmark.circle")
diff --git a/Asterism/Asterism/Views/SeriesListView.swift b/Asterism/Asterism/Views/SeriesListView.swiftdeleted file mode 100644index 300a6b29..00000000--- a/Asterism/Asterism/Views/SeriesListView.swift+++ /dev/null@@ -1,140 +0,0 @@-import AsterismCore-import ConstellationKit-import SwiftUI--/// The series list (Req 1.6): every series with its member count, and the field-/// that creates one.-///-/// `WorkTypesListView`'s shape, with one difference that matters: a row does not-/// push a `NavigationLink` of its own. The series screen is a route on the Works-/// stack (Decision 7), so the row asks the host to append it — which is what-/// makes list → series → back return to this list in both layouts.-struct SeriesListView: View {- @State private var model: SeriesListModel- /// `AppLibraryModel.snapshotGeneration`. A series or a member arriving- /// through sync bumps it, and this screen re-reads on the bump (Req 11.2).- let snapshotGeneration: Int- let showsSky: Bool- let onSelectSeries: (UUID) -> Void-- init(- model: SeriesListModel,- snapshotGeneration: Int,- showsSky: Bool,- onSelectSeries: @escaping (UUID) -> Void- ) {- _model = State(initialValue: model)- self.snapshotGeneration = snapshotGeneration- self.showsSky = showsSky- self.onSelectSeries = onSelectSeries- }-- var body: some View {- List {- addSection- listSection- }- // Req 8.1 of `ipad-and-mac-layouts`: the Works tab's sky shows through- // the pushed screen, and the Mac's alternating rows would stripe it.- .scrollContentBackground(.hidden)- .macListChrome()- .navigationTitle("Series")- .inlineNavigationTitle()- .screenSky(showsSky)- .accessibilityIdentifier("series-list")- .task(id: snapshotGeneration) { await model.reload(for: snapshotGeneration) }- }-- // MARK: - Adding (Req 1.1)-- /// The work-types screen's shape: a field and the button that commits it, on- /// one row, so the two are read as the single action they are.- @ViewBuilder- private var addSection: some View {- Section {- HStack {- // A series name is data, not prose: the keyboard must not- // capitalise or correct a name the reader chose deliberately.- TextField("New series name", text: $model.draftName)- .autocorrectionDisabled()- .noAutocapitalization()- .accessibilityIdentifier("series-list-add-field")- Button {- Task { await model.add() }- } label: {- Text("Add")- .frame(- minWidth: AsterismLayout.minHitTarget,- minHeight: AsterismLayout.minHitTarget- )- .contentShape(Rectangle())- }- .disabled(!model.canAdd)- .accessibilityIdentifier("series-list-add-button")- }- .frame(minHeight: AsterismLayout.minHitTarget)-- // Req 1.1's refusal, in the one line the screen says back. Worded by- // the model.- if let message = model.message {- Text(message)- .font(.caption)- .foregroundStyle(.secondary)- .accessibilityIdentifier("series-list-message")- }- }- }-- // MARK: - The list (Req 1.6)-- @ViewBuilder- private var listSection: some View {- switch model.state {- case .loading:- ProgressView("Loading…")- .accessibilityIdentifier("series-list-loading")- case .error(let message):- Text(message)- .font(.callout)- .foregroundStyle(.secondary)- .accessibilityIdentifier("series-list-error")- case .ready:- if model.rows.isEmpty {- Text(model.emptyMessage)- .font(.callout)- .foregroundStyle(.secondary)- .accessibilityIdentifier("series-list-empty")- } else {- ForEach(model.rows) { row in- seriesRow(row)- }- }- }- }-- private func seriesRow(_ row: SeriesListModel.Row) -> some View {- Button {- onSelectSeries(row.id)- } label: {- HStack(spacing: 10) {- Text(row.label)- .font(AsterismTypography.serifRowTitle)- .foregroundStyle(AsterismColors.primaryText)- .lineLimit(1)- .truncationMode(.tail)- Spacer()- // §7's count pill, as the work rows and the Unattached group- // wear it.- Text("\(row.memberCount)")- .constellationPill(.count)- }- .frame(minHeight: AsterismLayout.minHitTarget)- .contentShape(Rectangle())- }- .buttonStyle(.plain)- .accessibilityIdentifier("series-row-\(row.id.uuidString)")- // The count is a pill beside the name, so the sentence is where a reader- // who cannot see it hears the number.- .accessibilityLabel("\(row.label), \(row.countLabel)")- }-}
diff --git a/Asterism/Asterism/Views/WorkDetailView.swift b/Asterism/Asterism/Views/WorkDetailView.swiftindex c7aff4c4..bceb18e1 100644--- a/Asterism/Asterism/Views/WorkDetailView.swift+++ b/Asterism/Asterism/Views/WorkDetailView.swift@@ -2972,7 +2972,7 @@ extension View { /// A modifier of its own rather than a sixth presentation inline on the /// screen's `List`: that expression was already at the edge of what the type /// checker will solve, and one more sent it over.- fileprivate func finishedReadingDialog(_ model: WorkDetailModel) -> some View {+ func finishedReadingDialog(_ model: WorkDetailModel) -> some View { confirmationDialog( "Mark as finished?", isPresented: Binding(
diff --git a/Asterism/Asterism/Views/WorksView.swift b/Asterism/Asterism/Views/WorksView.swiftindex a6fd2036..6996b337 100644--- a/Asterism/Asterism/Views/WorksView.swift+++ b/Asterism/Asterism/Views/WorksView.swift@@ -2,12 +2,12 @@ import AsterismCore import ConstellationKit import SwiftUI -/// Works tab: shows non-empty works, empty works, and unattached entries group.+/// Library home and the shared row affordances used by its destinations. struct WorksView: View { let snapshot: WorksSnapshot let onSelectWork: (UUID) -> Void let onSelectEntry: (UUID) -> Void- let onNewWork: () -> Void+ let onNewWork: (ReadingStatus) -> Void /// Req 4.4 of `series-and-related-works`: a series section header opens its /// series' screen. let onSelectSeries: (UUID) -> Void@@ -56,6 +56,13 @@ struct WorksView: View { /// Req 3.1: false in the wide tree, where the window paints one sky behind /// every column. let showsSky: Bool+ let isWide: Bool+ @State private var directoryModel: SeriesListModel?+ @State private var creatorModel: CreatorListModel?+ let snapshotGeneration: Int+ let onReturnToHub: () -> Void+ let onSelectDestination: (WorksDestination) -> Void+ let onChangeStatus: (UUID) -> Void init( snapshot: WorksSnapshot,@@ -66,9 +73,16 @@ struct WorksView: View { selectedWorkID: UUID? = nil, searchFocusRequest: Int = 0, showsSky: Bool = true,+ isWide: Bool = false,+ directoryModel: SeriesListModel? = nil,+ creatorModel: CreatorListModel? = nil,+ snapshotGeneration: Int = 0,+ onReturnToHub: @escaping () -> Void = {},+ onSelectDestination: @escaping (WorksDestination) -> Void = { _ in },+ onChangeStatus: @escaping (UUID) -> Void = { _ in }, onSelectWork: @escaping (UUID) -> Void, onSelectEntry: @escaping (UUID) -> Void,- onNewWork: @escaping () -> Void,+ onNewWork: @escaping (ReadingStatus) -> Void, onSelectSeries: @escaping (UUID) -> Void, onShowSeriesList: @escaping () -> Void, onShowCreatorList: @escaping () -> Void,@@ -84,6 +98,13 @@ struct WorksView: View { self.selectedWorkID = selectedWorkID self.searchFocusRequest = searchFocusRequest self.showsSky = showsSky+ self.isWide = isWide+ _directoryModel = State(initialValue: directoryModel)+ _creatorModel = State(initialValue: creatorModel)+ self.snapshotGeneration = snapshotGeneration+ self.onChangeStatus = onChangeStatus+ self.onSelectDestination = onSelectDestination+ self.onReturnToHub = onReturnToHub self.onSelectWork = onSelectWork self.onSelectEntry = onSelectEntry self.onNewWork = onNewWork@@ -95,574 +116,157 @@ struct WorksView: View { self.onResolveToReadMatch = onResolveToReadMatch } - /// `site-display-names`: what the site filter's rows and its active pill- /// spell. The row keys stay hostnames (Q10); only the spelling moves.- @Environment(\.siteNames) private var siteNames+ @Environment(\.dynamicTypeSize) private var dynamicTypeSize+ @AppStorage(RestoreStorageKey.worksDestination) private var destination = "" - /// Req 4.1's query. The filter only removes rows, so the section split- /// below (and with it empty works sinking) is unaffected by it.- @State private var searchQuery = ""-- /// `works-list-options` Reqs 3-4, Q5: a sort of the whole library is a- /// preference a reader sets once, so it persists — one value per device,- /// shared by the compact and wide trees, not synced.- ///- /// Stored as the raw string and read back through `WorksSort(storedValue:)`- /// so a value written by a later build reads as the default rather than- /// trapping.- @AppStorage(WorksListStorageKey.sort) private var storedSort: String =- WorksSort.default.rawValue-- /// Req 4.3 of `series-and-related-works`: how the library is arranged is a- /// preference, so it persists beside the sort — and is cleared beside it on- /// a seeded UI-test launch.- @AppStorage(WorksListStorageKey.groupBySeries) private var groupBySeries = false-- /// `works-list-options` Q5: a filter is a question the reader is asking- /// now, so it lives beside the query with the query's lifetime — it- /// survives a tab switch and a push to a work, and goes with the view- /// instance. Nothing resets it any more: the one route that did was Recent's- /// truncation footer, which went with the row cap (`update-schedule` Q24).- @State private var filter = WorksFilter()-- private var sort: WorksSort { WorksSort(storedValue: storedSort) }-- private var sortBinding: Binding<WorksSort> {- Binding(get: { sort }, set: { storedSort = $0.rawValue })- }-- private var searchFilter: WorksSearchFilter {- WorksSearchFilter(query: searchQuery)- }-- /// Search, then filter — the two narrowings, in the order the requirements- /// state and order-independent of each other anyway.- ///- /// The **sort** is no longer applied here: a series section is ordered by- /// position rather than by the reader's choice (Req 4.3 of- /// `series-and-related-works`), so ordering is `WorksGrouping`'s to do once- /// it knows which run it is ordering. What is left here is the answer to- /// "does anything match", which is what the two empty branches ask.- private var narrowedWorks: [WorkSnapshot] {- filter.apply(to: searchFilter.apply(to: snapshot.works))- }-- /// Req 4.9's branch, asked of the **unfiltered** snapshot: a library with- /// nothing in it has nothing to search either, and a query typed against one- /// should not turn "still arriving" into "no results".- ///- /// Only `.arriving` changes what this screen draws. `.settled` falls through- /// to today's list, which shows the empty unattached group rather than an- /// empty state of its own — Req 9.3 keeps the phone exactly as it was.- private var arrivingState: ArrivingLibraryPresentation.EmptyState? {- ArrivingLibraryPresentation.emptyState(- isAwaitingFirstSync: isAwaitingFirstSync,- hasContent: ArrivingLibraryPresentation.hasContent(worksSnapshot: snapshot))- }-- private var arrivingBranch: some View {- ContentUnavailableView(- ArrivingLibraryPresentation.title,- systemImage: ArrivingLibraryPresentation.systemImage,- description: Text(ArrivingLibraryPresentation.message)- )- .accessibilityIdentifier("works-empty-first-sync")+ private var selectedGroup: WorksGroup? { WorksGroup(rawValue: destination) }+ private var showsGroup: Binding<Bool> {+ Binding(get: { selectedGroup != nil || destination == "allWorks" },+ set: { if !$0 { destination = "" } }) } var body: some View {- // Narrowed, sorted and sectioned once per body evaluation — the- // narrowing runs per keystroke, and the empty check plus every section- // consume it. `works-list-options` Req 2 and Q4's empty-works section- // is `WorksGrouping`'s now, along with Req 4.3's series sections.- let displayedWorks = narrowedWorks- let sections = WorksGrouping.sections(- displayedWorks, sort: sort, groupBySeries: groupBySeries) Group {- if arrivingState == .arriving {- arrivingBranch- } else if filter.isActive && displayedWorks.isEmpty {- // `works-list-options` Req 8: a filter that matches nothing,- // with or without a query, names what is narrowing the list —- // the options are not faceted (Q12), so this dead end has to- // explain itself.- filterEmptyBranch- } else if searchFilter.isActive && displayedWorks.isEmpty {- // Req 4.3, unchanged for the query-only miss (Q13). The- // unattached group is hidden under a query (4.2), so with no- // matching work there is genuinely nothing to list.- ContentUnavailableView.search(text: searchQuery)- .accessibilityIdentifier("works-search-empty")+ if isWide && showsGroup.wrappedValue {+ WorksGroupView(library: self, group: selectedGroup, onBack: { destination = ""; onReturnToHub() })+ .id(destination) } else {- worksList(sections: sections, titles: titlesByWorkID)- }- }- // Requirement 8.1's fixed layer. On the screen's own root rather than- // on the enclosing `NavigationStack`: a background applied outside the- // stack renders behind the stack's own opaque backing and never- // reaches the screen. In the wide tree the window owns it (Req 3.1).- .screenSky(showsSky)- // On the outer container, so the field survives the empty branch.- // Through the seam, which is `.searchable` on iOS and the Mac's own- // `ColumnSearchField` (design §Platform seams); either way it is what- // ⌘F moves focus into.- .listSearch(- text: $searchQuery, prompt: "Search works", focusRequest: searchFocusRequest)- // A chosen value the new snapshot no longer offers is dropped, so the- // picker never holds a selection none of its rows carry.- .onChange(of: filterOptions) { _, options in- filter = filter.pruned(to: options)- }- .toolbar {- // `works-list-options` Req 6, Q2: one menu beside New Work on every- // platform, rather than a capsule above the list — the rows would- // pay for that chrome at accessibility sizes, and a sort plus three- // open vocabularies is not what a capsule is for. No `#if` here:- // `Menu` and `Picker` are cross-platform, so the Mac gets the same- // control from the same source.- // Req 1.6: the series list, reached from the Works list's own- // toolbar. The order is Series, Creators, the options menu, New Work- // — the two controls that navigate to a list sit together at the- // leading end, with the menu between them and New Work.- ToolbarItem(placement: .primaryAction) {- Button {- onShowSeriesList()- } label: {- Label("Series", systemImage: "books.vertical")- }- .accessibilityIdentifier(WorksFilterPresentation.seriesListButtonIdentifier)- }- // `work-creators` Req 1.6, after the Series control and before the- // options menu: the two list controls sit together, and Q41 chose a- // fourth button over a Browse menu that would have moved the series- // one.- ToolbarItem(placement: .primaryAction) {- Button {- onShowCreatorList()- } label: {- Label("Creators", systemImage: "person.2")- }- .accessibilityIdentifier(WorksFilterPresentation.creatorsListButtonIdentifier)- }- ToolbarItem(placement: .primaryAction) {- optionsMenu- }- ToolbarItem(placement: .primaryAction) {- Button {- onNewWork()- } label: {- Label("New Work", systemImage: "plus")- }- .accessibilityIdentifier("works-new-work-button")- }- }- }-- // MARK: - Sort and filter menu-- /// Req 6's one control. The pickers are inline rather than submenus (Q2):- /// five submenus on a phone is five extra taps, and an inline picker renders- /// its label as the section header the requirement asks for.- private var optionsMenu: some View {- Menu {- Picker("Sort", selection: sortBinding) {- ForEach(WorksSort.allCases) { option in- Text(option.label)- .accessibilityIdentifier(WorksFilterPresentation.sortRowIdentifier(option))- .tag(option)- }- }- .pickerStyle(.inline)-- // Req 4.3's toggle, after the sort it arranges the result of.- Toggle("Group by series", isOn: $groupBySeries)- .accessibilityIdentifier(WorksFilterPresentation.groupBySeriesRowIdentifier)-- filterPicker(- "Type", options: filterOptions.types, selection: $filter.type,- anyIdentifier: WorksFilterPresentation.anyTypeRowIdentifier,- tag: \.selection,- identifier: { WorksFilterPresentation.typeRowIdentifier($0.selection) }- ) { option in- Text(option.name)- // Req 5: a type every one of whose works wears a removed- // assignment is knocked down the way the editor's own type- // menu knocks one down. AppKit menus largely ignore a row's- // foreground style; that is accepted.- .foregroundStyle(- WorkTypePresentation.menuRowStyle(for: option.isDimmed ? .removed : .active))- }-- filterPicker(- "Tag", options: filterOptions.tags, selection: $filter.tag,- anyIdentifier: WorksFilterPresentation.anyTagRowIdentifier,- tag: \.self,- identifier: WorksFilterPresentation.tagRowIdentifier- ) { Text($0) }-- filterPicker(- "Site", options: filterOptions.hostnames, selection: $filter.hostname,- anyIdentifier: WorksFilterPresentation.anySiteRowIdentifier,- tag: \.self,- identifier: WorksFilterPresentation.siteRowIdentifier- ) {- // The option's key is the hostname — the identifier and the tag- // both stay it (Q10) — and only the row's text is the name.- Text(siteNames.label(for: $0))- .lineLimit(1)- .truncationMode(.tail)- }-- // Req 4.2's sixth dimension, after Site. "No series" is a row of the- // options rather than a second fixed row beside "Any": it is a- // value the reader can pick and see on a pill, where "Any" is the- // absence of a question.- filterPicker(- "Series", options: seriesFilterOptions, selection: $filter.series,- anyIdentifier: WorksFilterPresentation.anySeriesRowIdentifier,- tag: \.self,- identifier: WorksFilterPresentation.seriesRowIdentifier- ) {- // Through the options, so a same-named pair wears the qualifier- // the section header and the pill wear (Req 1.3).- Text(filterOptions.label(for: $0))- .lineLimit(1)- .truncationMode(.tail)- }-- // `work-creators` Req 5.1's seventh dimension, after Series. "No- // creators" is a row of the options rather than a second fixed row- // beside "Any", for the series dimension's reason: it is a value the- // reader can pick and see on a pill, where "Any" is the absence of a- // question.- filterPicker(- "Creator", options: creatorFilterOptions, selection: $filter.creator,- anyIdentifier: WorksFilterPresentation.anyCreatorRowIdentifier,- tag: \.self,- identifier: WorksFilterPresentation.creatorRowIdentifier- ) {- Text(filterOptions.label(for: $0))- .lineLimit(1)- .truncationMode(.tail)- }-- // `work-and-reading-status` Req 6.1's two dimensions. They iterate- // `allCases` rather than a slice of `filterOptions`: the- // vocabularies are closed, so every value is offered whether or not- // a work currently carries it (Req 6.3, Q30).- // T-2353: both status vocabularies have a value called "Finished"- // (Q23), and — per `filterPicker`'s own note — only a row's- // visible text reaches VoiceOver or XCUI, never an- // `.accessibilityLabel`. So every row of both pickers shows the- // same qualified spelling their own pill already does- // (`WorkStatusPresentation.accessibilityLabel` /- // `ReadingStatusPresentation.accessibilityLabel`) rather than- // qualifying only the one value that collides.- filterPicker(- "Work status", options: WorkStatus.allCases, selection: $filter.workStatus,- anyIdentifier: WorksFilterPresentation.anyWorkStatusRowIdentifier,- tag: \.self,- identifier: WorksFilterPresentation.workStatusRowIdentifier- ) { Text(WorkStatusPresentation.accessibilityLabel($0)) }-- filterPicker(- "Reading status", options: ReadingStatus.allCases,- selection: $filter.readingStatus,- anyIdentifier: WorksFilterPresentation.anyReadingStatusRowIdentifier,- tag: \.self,- identifier: WorksFilterPresentation.readingStatusRowIdentifier- ) { Text(ReadingStatusPresentation.accessibilityLabel($0)) }-- // `update-schedule` Req 11.1's ninth dimension, after the reading- // status. Its vocabulary is closed too, so both values are offered- // whether or not a work answers to either (Req 11.3).- filterPicker(- "Release days", options: ReleaseDayPresence.allCases,- selection: $filter.releaseDays,- anyIdentifier: WorksFilterPresentation.anyReleaseDaysRowIdentifier,- tag: \.self,- identifier: WorksFilterPresentation.releaseDaysRowIdentifier- ) { Text($0.name) }- } label: {- // Req 6: filled while any filter is active. The sort alone does not- // change it — every list has a sort, so a permanently filled icon- // would say nothing.- Label(- "Sort and Filter",- systemImage: filter.isActive- ? "line.3.horizontal.decrease.circle.fill"- : "line.3.horizontal.decrease.circle")- }- .accessibilityIdentifier("works-list-options-menu")- .accessibilityLabel(- filter.isActive ? "Sort and filter works, filters active" : "Sort and filter works")- }-- /// Req 4.2's rows below "Any": "No series", then every series with a visible- /// member. Always at least one row, because "No series" is offered whether- /// or not the library holds a series at all.- private var seriesFilterOptions: [WorksSeriesSelection] {- [.noSeries] + filterOptions.series.map { WorksSeriesSelection.series($0.id) }- }-- /// Req 5.1's rows below "Any": "No creators", then every creator with a- /// visible credited work. Always at least one row, because "No creators" is- /// offered whether or not the library holds a creator at all.- private var creatorFilterOptions: [WorksCreatorSelection] {- [.noCreators] + filterOptions.creators.map { WorksCreatorSelection.creator($0.id) }- }-- /// One filter dimension: "Any" — the one selection that is not a value, so- /// it cannot be drawn from the options — then every value the snapshot- /// offers. Stated once for every dimension so the "Any" row and the- /// identifiers cannot be spelled a different way per filter.- ///- /// **T-2353.** `.accessibilityIdentifier` on the `Text` inside an inline- /// `Picker` does not reliably reach the menu item XCUI (or VoiceOver) sees- /// on this OS — `docs/agent-notes/testing.md` already records that as a- /// general fact about this control — and measurement for this bug found- /// that `.accessibilityLabel` fares no better: SwiftUI builds this row as a- /// native `UIMenu` action from the row's own visible text, not from the- /// view (or its accessibility modifiers) that produced it, so a label- /// applied in SwiftUI is dropped along with the identifier. The only string- /// that reaches VoiceOver or XCUI is what the row **shows**. So every one- /// of the eight `filterPicker`s this menu draws falls back to it, and every- /// one of them draws an "Any" row: eight identical, unqualified "Any" a- /// VoiceOver reader cannot place, which is the same defect that made- /// `app.buttons["Any"]` ambiguous for a UI test. (The menu's ninth picker,- /// Sort, is drawn separately above and offers no "Any" row.) Qualifying the- /// row's own text by dimension — "Any type", "Any site" — fixes both at- /// once.- private func filterPicker<Option: Hashable, Tag: Hashable, RowLabel: View>(- _ title: String,- options: [Option],- selection: Binding<Tag?>,- anyIdentifier: String,- tag: KeyPath<Option, Tag>,- identifier: @escaping (Option) -> String,- @ViewBuilder label: @escaping (Option) -> RowLabel- ) -> some View {- Picker(title, selection: selection) {- Text(WorksFilterPresentation.anyRowLabel(title))- .accessibilityIdentifier(anyIdentifier)- .tag(Tag?.none)- ForEach(options, id: \.self) { option in- label(option)- .accessibilityIdentifier(identifier(option))- .tag(Tag?.some(option[keyPath: tag]))+ WorksSearchContent(library: self, group: nil, isHub: true) { hub }+ .toolbar {+ ToolbarItem(placement: .primaryAction) {+ Button { onNewWork(.toRead) } label: { Label("New Work", systemImage: "plus") }+ .accessibilityIdentifier("works-new-work-button")+ }+ } } }- .pickerStyle(.inline)- }-- // MARK: - Active filters-- /// What the pills and the empty state both name — the active values in menu- /// order, spelled as the picker spells them.- private var activeFilterLabels: [String] {- WorksFilterPresentation.activeLabels(- filter, options: filterOptions, siteNames: siteNames)- }-- /// Req 7's pill row, drawn only where the caller has established that a- /// filter is active — a section whose header is a *conditional* view is- /// still a section with a header, and an unfiltered list must be exactly- /// what it was before this feature.- private var filterPills: some View {- FlowLayout(spacing: 6) {- ForEach(activeFilterLabels, id: \.self) { label in- Text(label)- // The neutral tag recipe, as the row's own asides use.- .constellationPill(.genreTag)- .lineLimit(1)- // On each pill rather than on the row around them: an- // identifier applied to a container is *pushed down* onto- // every element inside it, so naming the `FlowLayout` gave- // the Clear button this identifier too and took away its- // own. Measured from a UI-test element dump, where the- // button read `identifier: 'works-filter-pills', label:- // 'Clear filters'` and `works-filter-clear` addressed- // nothing in the pill row.- .accessibilityIdentifier("works-filter-pills")- }- clearFiltersButton+ .task(id: snapshotGeneration) {+ await directoryModel?.reload(for: snapshotGeneration)+ await creatorModel?.reload(for: snapshotGeneration) } } - /// Req 7's Clear: it removes every filter and leaves the query alone (Q13).- /// One meaning for Clear, on both surfaces that offer it — the search field- /// stays on screen and editable, so a reader left on the search empty state- /// after clearing can see why.- private var clearFiltersButton: some View {- Button {- filter = WorksFilter()- } label: {- Text("Clear")- .constellationPill(.attention)- }- .buttonStyle(.plain)- .accessibilityIdentifier("works-filter-clear")- .accessibilityLabel("Clear filters")+ private func select(_ target: WorksDestination) {+ destination = target.storageValue+ onSelectDestination(target) } - /// Req 8's empty state, distinct from `works-search-empty`: a filtered miss- /// has to name what is narrowing the list, because the option lists are not- /// faceted (Q12) and a reader can reach a combination no work carries.- private var filterEmptyBranch: some View {- ContentUnavailableView {- Label("No matching works", systemImage: "line.3.horizontal.decrease.circle")- // On the state's own title rather than on the whole view, for- // the reason the pill row records: a container's identifier is- // pushed down onto every element inside it, and on the whole- // state it took `works-filter-clear` off the Clear button in- // the actions below — leaving Req 7's one meaningful control- // addressable only by its label.- .accessibilityIdentifier("works-filter-empty")- } description: {- Text(- WorksFilterPresentation.emptyDescription(- labels: activeFilterLabels,- query: searchFilter.isActive ? searchQuery : nil))- } actions: {- clearFiltersButton+ private var seriesProgress: [SeriesProgress] {+ let members = Dictionary(grouping: snapshot.works, by: { $0.series?.id })+ return (directoryModel?.rows ?? []).map { row in+ SeriesProgress.build(series: row.series.display, members: members[row.id] ?? []) } } - private func worksList(sections: [WorksSection], titles: [UUID: String]) -> some View {- List {- // Keyed by the section's own identity, not by its array offset: an- // offset makes a series section and a No series section the same- // row to SwiftUI the moment a filter changes how many series have- // visible members.- ForEach(sections) { section in- worksSection(- section, titles: titles,- // Req 7's pills belong to the *first* section, whichever- // that is: a filter leaving only empty works still has to- // say so.- showsFilterPills: filter.isActive && section.id == sections.first?.id,- // A series section is always named. The run after them is- // named once, on the first of its two possible sections —- // which the grouping already knows and carries — and only- // while the toggle is on: with it off this is the list- // exactly as it was.- showsHeader: section.seriesDisplay != nil- || (groupBySeries && section.isLeadingWithoutSeries))- }-- // Unattached notes group. Hidden outright while a query is active- // (Req 4.2, Q12): these entries have no work title to search, and- // an empty group under a query reads as "your search cleared them".- // A filter hides it for the same reason (`works-list-options` Q9):- // unattached entries have no type, tag or work-site membership, so- // no filter can describe them.- if !searchFilter.isActive && !filter.isActive {- Section {- unattachedGroup- .constellationListRow()- } header: {- HStack(spacing: 6) {- ConstellationSectionHeader("Unattached Notes", accent: .violet)- .accessibilityIdentifier("unattached-section-header")- Spacer()- // §7/Req 9.4: the group carries a count pill, as the- // work rows do. The header stays its own static-text- // element beside it (Q42).- Text("\(snapshot.unattachedEntries.count)")- .constellationPill(.count)- .accessibilityIdentifier("unattached-entry-count")+ private var hub: some View {+ ScrollView {+ VStack(alignment: .leading, spacing: 16) {+ LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 10),+ count: dynamicTypeSize.isAccessibilitySize ? 1 : 2), spacing: 10) {+ ForEach([WorksGroup.catchingUp, .reading, .toRead], id: \.self) { group in+ let members = group.sorted(group.members(of: snapshot.works))+ tile(group.title, count: members.count, covers: Array(members.prefix(3)),+ stat: tileStat(group, members: members), accent: group == .catchingUp,+ identifier: "works-tile-\(group.rawValue)") { select(.group(group)) } }+ let allSeries = seriesProgress+ let progress = allSeries.filter { $0.section == .inProgress }+ .sorted(by: SeriesProgress.precedes)+ tile("Series", count: allSeries.count, covers: Array(progress.compactMap(\.nextUp).prefix(3)),+ stat: "\(progress.count) in progress", accent: false,+ identifier: "works-tile-series") { destination = "series"; onShowSeriesList() } }- }- }- .listStyle(.plain)- // Req 8.1: content scrolls over the tab stack's sky.- .scrollContentBackground(.hidden)- // …and the Mac's alternating row backgrounds would stripe it- // (`ipad-and-mac-layouts` Req 3.3).- .macListChrome()- .accessibilityIdentifier("works-list")- }-- /// One section of work rows, with or without Req 7's pills and Req 4.3's- /// name.- ///- /// Two spellings rather than one with a conditional header (Q15): a section- /// built with a header is a section with a header even when that header- /// resolves to nothing, and an unfiltered, ungrouped list has to stay- /// exactly the list it was. The rows themselves are written once.- @ViewBuilder- private func worksSection(- _ section: WorksSection, titles: [UUID: String], showsFilterPills: Bool,- showsHeader: Bool- ) -> some View {- if showsFilterPills || showsHeader {- Section {- workRows(section, titles: titles)- } header: {- // The pills scroll with the content rather than sitting fixed- // above the list, for Q2's reason — chrome above the list costs- // the rows their space at accessibility sizes.- VStack(alignment: .leading, spacing: 6) {- if showsFilterPills { filterPills }- if showsHeader { sectionHeader(section) }+ VStack(spacing: 0) {+ destinationRow("Creators", symbol: "person.2", count: creatorModel?.rows.count ?? filterOptions.creators.count,+ id: "creators") { destination = "creators"; onShowCreatorList() }+ ForEach([WorksGroup.onHiatus, .finished, .abandoned], id: \.self) { group in+ Divider().overlay(AsterismColors.cardBorder)+ destinationRow(group.title, symbol: group == .onHiatus ? "pause.circle" :+ (ReadingStatusPresentation.systemImage(group == .finished ? .finished : .abandoned) ?? "book.closed"),+ count: group.members(of: snapshot.works).count, id: group.rawValue) {+ select(.group(group))+ }+ }+ Divider().overlay(AsterismColors.cardBorder)+ destinationRow("All works", symbol: "sparkles", count: snapshot.works.count, id: "allWorks") {+ select(.allWorks)+ } }- }- } else {- Section {- workRows(section, titles: titles)- }+ .padding(.horizontal, 14)+ .constellationCard()+ let recent = snapshot.works.filter { !$0.entries.isEmpty }.prefix(3)+ if !recent.isEmpty {+ ConstellationSectionHeader("Recently noted", accent: .violet)+ ForEach(Array(recent), id: \.id) { work in+ Button { onSelectWork(work.id) } label: {+ HStack(spacing: 12) {+ WorkThumbnailView(work: work, size: CGSize(width: 36, height: 50))+ VStack(alignment: .leading, spacing: 3) {+ Text(work.displayTitle).font(AsterismTypography.serifRowTitle).lineLimit(1)+ Text(WorksRowDetail.noted(work)).font(.caption)+ .foregroundStyle(AsterismColors.secondaryText).lineLimit(1)+ }+ Spacer(minLength: 0)+ }.padding(8).constellationCard()+ }.buttonStyle(.plain)+ .accessibilityIdentifier("works-recent-row-\(work.id.uuidString)")+ }+ }+ }.padding(16)+ }+ .accessibilityElement(children: .contain)+ .accessibilityIdentifier("works-hub")+ }++ private func tileStat(_ group: WorksGroup, members: [WorkSnapshot]) -> String {+ switch group {+ case .reading:+ let count = members.filter { WorksRowDetail.releasesToday($0) }.count+ return count == 0 ? "" : "\(count) release today"+ case .toRead:+ return members.map(\.createdAt).min().map { "oldest from " + $0.formatted(.dateTime.month(.wide)) } ?? ""+ default: return "\(members.count) works" } } - /// A series section's header opens its series (Req 4.4); the No series run's- /// names itself and goes nowhere. Both wear the count pill the Unattached- /// group and the work rows wear.- @ViewBuilder- private func sectionHeader(_ section: WorksSection) -> some View {- switch section {- case .series(let display, let works):- Button {- onSelectSeries(display.id)- } label: {- HStack(spacing: 6) {- ConstellationSectionHeader(display.label, accent: .violet)+ private func tile(_ title: String, count: Int, covers: [WorkSnapshot], stat: String,+ accent: Bool, identifier: String, action: @escaping () -> Void) -> some View {+ Button(action: action) {+ VStack(alignment: .leading, spacing: 3) {+ HStack(alignment: .top) {+ Text("\(count)").font(.title.bold())+ .foregroundStyle(accent ? AsterismColors.cyan : AsterismColors.primaryText) Spacer()- Text("\(works.count)")- .constellationPill(.count)+ if !dynamicTypeSize.isAccessibilitySize {+ HStack(spacing: -8) {+ ForEach(covers, id: \.id) { work in+ WorkThumbnailView(work: work, size: CGSize(width: 22, height: 31))+ .overlay(RoundedRectangle(cornerRadius: 4).strokeBorder(AsterismColors.backgroundTop, lineWidth: 1.5))+ }+ }+ } }- .contentShape(Rectangle())- }- .buttonStyle(.plain)- .accessibilityIdentifier(- WorksFilterPresentation.seriesSectionHeaderIdentifier(display.id))- .accessibilityLabel("Open series \(display.label)")- case .noSeries(let works, _):- HStack(spacing: 6) {- // The identifier is on the header text rather than the row, for- // the reason the pills record: on the container it would be- // pushed onto the count pill as well.- ConstellationSectionHeader(WorksFilterOptions.noSeriesLabel, accent: .violet)- .accessibilityIdentifier("works-no-series-header")+ Spacer(minLength: 8)+ Text(title).font(.subheadline.weight(.semibold))+ if !stat.isEmpty { Text(stat).font(.caption).foregroundStyle(AsterismColors.secondaryText).lineLimit(1) }+ }.padding(14).frame(minHeight: 112).constellationCard()+ }.buttonStyle(.plain).accessibilityIdentifier(identifier)+ }++ private func destinationRow(_ title: String, symbol: String, count: Int, id: String,+ action: @escaping () -> Void) -> some View {+ Button(action: action) {+ HStack(spacing: 12) {+ Image(systemName: symbol).foregroundStyle(AsterismColors.violet).frame(width: 20)+ Text(title) Spacer()- Text("\(works.count)")- .constellationPill(.count)- }- }- }-- private func workRows(_ section: WorksSection, titles: [UUID: String]) -> some View {- ForEach(section.works, id: \.id) { work in- // Req 4.1: the row's series line is what the section header already- // says, so it goes while the list is grouped.- workButton(work, titles: titles, showsSeries: !groupBySeries)- .constellationListRow()- }+ Text("\(count)").foregroundStyle(AsterismColors.secondaryText)+ Image(systemName: "chevron.right").font(.caption).foregroundStyle(AsterismColors.secondaryText)+ }.frame(minHeight: 46).contentShape(Rectangle())+ }.buttonStyle(.plain).accessibilityIdentifier("works-destination-\(id)") } - /// §7's unattached-notes group: one dashed, lower-fill container around the- /// rows rather than a dashed edge per row — the group is what the style- /// guide marks.- private var unattachedGroup: some View {+ var unattachedGroup: some View { VStack(alignment: .leading, spacing: 4) { if snapshot.unattachedEntries.isEmpty { Text("No unattached notes")@@ -689,11 +293,9 @@ struct WorksView: View { .constellationDashedGroup() } - /// The row and its Resolve pill are sibling buttons, exactly as Recent's- /// are: nesting the pill inside the navigation button makes SwiftUI route- /// the tap to the outer action.- private func workButton(- _ work: WorkSnapshot, titles: [UUID: String], showsSeries: Bool+ func workButton(+ _ work: WorkSnapshot, titles: [UUID: String], showsSeries: Bool, siteNames: SiteNames,+ group: WorksGroup? = nil ) -> some View { let item = duplicateWorkload.item(for: work.id, type: .work) let toReadMatch = duplicateWorkload.toReadMatch(for: work.id)@@ -701,7 +303,9 @@ struct WorksView: View { Button { onSelectWork(work.id) } label: {- WorkRow(work: work, showsSeries: showsSeries)+ WorkRow(work: work, showsSeries: showsSeries,+ detailText: group?.detail(for: work, site: siteNames.label(for: work.primaryHostname)),+ showsNewToday: group == .reading && WorksRowDetail.isNewToday(work)) .frame(maxWidth: .infinity, alignment: .leading) .contentShape(Rectangle()) }@@ -709,6 +313,7 @@ struct WorksView: View { .accessibilityIdentifier("work-row-\(work.id.uuidString)") .accessibilityLabel( WorksRowPresentation.openLabel(for: work, siteNames: siteNames))+ .accessibilityValue(group?.detail(for: work, site: siteNames.label(for: work.primaryHostname)) ?? "") if let item, let onResolveDuplicate { Button {@@ -787,9 +392,12 @@ struct WorksView: View { // row the selection border replaces the amber one — one of the two // states is about where the reader *is*, and the Merge pill still says // what the row needs.- .constellationCard(- borderColor: item == nil && toReadMatch == nil ? nil : AsterismColors.attentionBorder,- isSelected: work.id == selectedWorkID)+ .overlay {+ if work.id == selectedWorkID || item != nil || toReadMatch != nil {+ RoundedRectangle(cornerRadius: 12).strokeBorder(+ work.id == selectedWorkID ? AsterismColors.cyan : AsterismColors.attentionBorder)+ }+ } .accessibilityAddTraits(work.id == selectedWorkID ? [.isSelected] : []) } }@@ -933,6 +541,8 @@ struct WorkRow: View { /// of `series-and-related-works`). Off while the Works list is grouped by /// series, where the section header above the row already says it. var showsSeries: Bool = true+ var detailText: String? = nil+ var showsNewToday: Bool = false /// Req 2.7: a position is read in the viewing locale, so the row that shows /// one has to know what that is.@@ -995,7 +605,12 @@ struct WorkRow: View { .constellationPill(.count) .accessibilityIdentifier("work-entry-count") },- detail: { EmptyView() }+ detail: {+ if let detailText {+ Text("\(Text(detailText).foregroundColor(AsterismColors.secondaryText))\(Text(showsNewToday ? " · new today" : "").foregroundColor(AsterismColors.cyan))")+ .font(.caption)+ }+ } ) }
diff --git a/Asterism/AsterismTests/WorksListOptionsTests.swift b/Asterism/AsterismTests/WorksListOptionsTests.swiftindex cfb44db7..5ac837cf 100644--- a/Asterism/AsterismTests/WorksListOptionsTests.swift+++ b/Asterism/AsterismTests/WorksListOptionsTests.swift@@ -859,7 +859,6 @@ struct WorksSeriesFilterTests { #expect( WorksFilterPresentation.seriesSectionHeaderIdentifier(id(100)) == "works-series-header-\(id(100).uuidString)")- #expect(WorksFilterPresentation.groupBySeriesRowIdentifier == "works-list-group-by-series") #expect(WorksFilterPresentation.seriesListButtonIdentifier == "works-series-list-button") } @@ -869,152 +868,15 @@ struct WorksSeriesFilterTests { /// on a seeded launch, or it leaks into every launch after it. A unit test /// cannot drive `ContentView.launchModel()` — it resolves a launch argument /// and opens an App Group — so the list it iterates is what this pins (Q51).- @Test("The group toggle persists under its own key and is cleared with the sort")- func theGroupKeyIsClearedWithTheSort() {- #expect(WorksListStorageKey.groupBySeries == "worksList.groupBySeries")- #expect(- WorksListStorageKey.seededLaunchResets- == [WorksListStorageKey.sort, WorksListStorageKey.groupBySeries])- }-}--@Suite("Works grouping")-struct WorksGroupingTests {-- private func work(- _ index: Int,- _ title: String,- series: SeriesDisplay? = nil,- position: Double = 1,- entries: Bool = true,- readingStatus: ReadingStatus = .reading- ) -> WorkSnapshot {- TestFixtures.makeWork(- id: id(index), displayTitle: title,- entries: entries ? [TestFixtures.makeEntry(workID: id(index))] : [],- readingStatus: readingStatus,- membership: series.map { SeriesMembership(seriesID: $0.id, position: position) },- series: series)- }-- private let ashfall = display(100, "Ashfall Cycle")- private let quiet = display(101, "Quiet Shelf")-- // MARK: - The toggle off (Req 4.3)-- /// The ungrouped list has to stay exactly the list it was: the sort's own- /// partition, and the empty works trailing under a date sort only.- @Test("With the toggle off the sections are the existing partition")- func toggleOffIsTheExistingPartition() {- let works = [- work(1, "C", series: ashfall), work(2, "A"), work(3, "B", entries: false),- ]- let dated = WorksGrouping.sections(works, sort: .newest, groupBySeries: false)- #expect(dated.map(\.seriesDisplay) == [nil, nil])- #expect(dated.map { $0.works.map(\.id) } == [[id(1), id(2)], [id(3)]])-- let titled = WorksGrouping.sections(works, sort: .aToZ, groupBySeries: false)- #expect(titled.count == 1)- #expect(titled[0].works.map(\.displayTitle) == ["A", "B", "C"])- }-- @Test("An empty list has no sections under either toggle")- func anEmptyListHasNoSections() {- #expect(WorksGrouping.sections([], sort: .newest, groupBySeries: false).isEmpty)- #expect(WorksGrouping.sections([], sort: .newest, groupBySeries: true).isEmpty)- }-- // MARK: - The toggle on (Req 4.3)-- @Test("Series sections come first, in SeriesOrdering, before the No series run")- func seriesSectionsLeadInOrder() {- let works = [- work(1, "Loose"),- work(2, "Shelf One", series: quiet),- work(3, "Ash Two", series: ashfall, position: 2),- work(4, "Ash One", series: ashfall, position: 1),- ]- let sections = WorksGrouping.sections(works, sort: .newest, groupBySeries: true)- #expect(sections.map(\.seriesDisplay) == [ashfall, quiet, nil])- #expect(sections[0].works.map(\.id) == [id(4), id(3)])- #expect(sections[1].works.map(\.id) == [id(2)])- #expect(sections[2].works.map(\.id) == [id(1)])- }-- /// Req 3.1's order, not the reader's: position ascending, then title, then- /// identifier — whatever the sort says. The tie at 2.5 is broken by title- /// against the id order, so a section that had fallen back to either the- /// repository order or the reader's sort would read differently.- @Test("Members are in SeriesMemberOrdering whatever the sort")- func membersAreInPositionOrder() {- let works = [- work(1, "Zeta", series: ashfall, position: 1),- work(2, "Beta", series: ashfall, position: 2.5),- work(3, "Alpha", series: ashfall, position: 2.5),- ]- for sort in WorksSort.allCases {- let sections = WorksGrouping.sections(works, sort: sort, groupBySeries: true)- #expect(sections[0].works.map(\.id) == [id(1), id(3), id(2)], "\(sort)")- }- }-- /// Req 4.3 states it outright: no abandoned-last partition inside a series.- /// A series reads in its own order or it is not a series.- @Test("A series section is not partitioned by the abandoned rule")- func aSeriesKeepsItsAbandonedMembersInPlace() {- let works = [- work(1, "One", series: ashfall, position: 1),- work(2, "Two", series: ashfall, position: 2, readingStatus: .abandoned),- work(3, "Three", series: ashfall, position: 3),- ]- let sections = WorksGrouping.sections(works, sort: .newest, groupBySeries: true)- #expect(sections[0].works.map(\.id) == [id(1), id(2), id(3)])- }-- /// The other half of the same requirement: the run that is left is- /// partitioned and ordered exactly as the ungrouped list would be.- @Test("The No series run is partitioned exactly as the ungrouped list")- func theNoSeriesRunIsTheUngroupedPartition() {- let loose = [- work(1, "B"), work(2, "A", readingStatus: .abandoned),- work(3, "D", entries: false), work(4, "C"),- ]- let works = loose + [work(5, "Member", series: ashfall)]- for sort in WorksSort.allCases {- let grouped = WorksGrouping.sections(works, sort: sort, groupBySeries: true)- let ungrouped = WorksGrouping.sections(loose, sort: sort, groupBySeries: false)- #expect(grouped.first?.seriesDisplay == ashfall, "\(sort)")- #expect(- grouped.dropFirst().map { $0.works.map(\.id) }- == ungrouped.map { $0.works.map(\.id) }, "\(sort)")+ @Test("Every destination preference resets on seeded launches")+ func destinationPreferencesReset() {+ #expect(WorksListStorageKey.seededLaunchResets.contains(WorksListStorageKey.sort))+ #expect(WorksListStorageKey.seededLaunchResets.contains(RestoreStorageKey.worksDestination))+ for group in WorksGroup.allCases {+ #expect(WorksListStorageKey.seededLaunchResets.contains("worksGroup.sort." + group.rawValue)) } } - /// The filter and the query have already run when this is called, so a- /// series every one of whose members was narrowed away has no section — the- /// list would otherwise show a header over nothing.- @Test("A series with no visible member has no section")- func aSeriesWithNoVisibleMemberIsAbsent() {- let works = [work(1, "Only", series: ashfall)]- let sections = WorksGrouping.sections(- WorksFilter(series: .series(quiet.id)).apply(to: works),- sort: .newest, groupBySeries: true)- #expect(sections.isEmpty)- }-- /// A membership whose series row has not arrived cannot head a section —- /// there is no name to put on it — so the work joins the No series run,- /// where its row says "Unavailable series" instead (Req 4.1).- @Test("An unresolved membership lands in the No series run")- func anUnresolvedMembershipIsNotItsOwnSection() {- let works = [- work(1, "Adrift", series: unresolvedDisplay(200)),- work(2, "Member", series: ashfall),- ]- let sections = WorksGrouping.sections(works, sort: .newest, groupBySeries: true)- #expect(sections.map(\.seriesDisplay) == [ashfall, nil])- #expect(sections[1].works.map(\.id) == [id(1)])- } } @Suite("Series row text")@@ -1291,14 +1153,8 @@ struct WorksCreatorFilterTests { } for sort in WorksSort.allCases { #expect(sort.apply(to: bare).map(\.id) == sort.apply(to: credited).map(\.id), "\(sort)")- for grouped in [false, true] {- #expect(- WorksGrouping.sections(bare, sort: sort, groupBySeries: grouped)- .map { $0.works.map(\.id) }- == WorksGrouping.sections(credited, sort: sort, groupBySeries: grouped)- .map { $0.works.map(\.id) },- "\(sort) grouped: \(grouped)")- }+ #expect(WorksGrouping.ungrouped(bare, sort: sort).map { $0.works.map(\.id) }+ == WorksGrouping.ungrouped(credited, sort: sort).map { $0.works.map(\.id) }) } } }
diff --git a/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift b/Asterism/AsterismUITests/AccessibilityJourneyUITests.swiftindex 95e419b5..ffe45cd5 100644--- a/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift+++ b/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift@@ -267,65 +267,18 @@ final class AccessibilityJourneyUITests: XCTestCase { /// made with it on: the menu button in the bar, a work row under the pills, /// and the menu opening a second time on a list that is already filtered. @MainActor- func testWorksOptionsMenuStaysUsableAtLargestDynamicType() {- launchSeeded(- scenario: "seeded-works-options",- extraArguments: [- "-UIPreferredContentSizeCategoryName", "UICTContentSizeCategoryAccessibilityXXXL"- ]- )-- let works = app.tabControl(.works)- XCTAssertTrue(works.waitForExistence(timeout: 30), "The Works tab is reachable")- works.tap()- XCTAssertTrue(- app.collectionViews["works-list"].waitForExistence(timeout: 15),- "Works lists the seeded library")-- let menu = app.buttons["works-list-options-menu"]- assertSystemControl(menu, named: "The sort and filter menu at largest Dynamic Type")-- // A site filter, which is two of the fixture's four works — chosen- // rather than a sort, because only a filter draws the pill header this- // case is about. The chooser opens the menu, which is the assertion that- // it opens at all: it fails the case if no row is ever reachable.- chooseWorksOption("works-filter-site-alpha.test", labelled: "alpha.test", in: app)-- assertSystemControl(menu, named: "The menu button under an active filter")- XCTAssertEqual(- menu.label, "Sort and filter works, filters active",- "…and it says a filter is on")-+ func testWorksTokensStayUsableAtLargestDynamicType() {+ launchSeeded(scenario: "seeded-works-options", extraArguments: [+ "-UIPreferredContentSizeCategoryName", "UICTContentSizeCategoryAccessibilityXXXL"])+ openAllWorks(in: app)+ assertSystemControl(app.buttons["works-group-sort-menu"], named: "Group sort")+ chooseWorksToken("site", labelled: "alpha.test", in: app)+ chooseWorksToken("status", labelled: "Work: Finished", in: app) let row = app.elements(withIdentifierPrefix: "work-row-").firstMatch- XCTAssertTrue(row.waitForExistence(timeout: 15), "The filtered list still draws rows")+ XCTAssertTrue(row.waitForExistence(timeout: 15)) scrollToElement(row, attempts: 8)- assertContentControl(row, named: "A work row under the filter pills")-- // `work-and-reading-status` Req 10.2: a status filter is chosen through- // the same menu at this size, and the row it leaves wears a work-status- // glyph and a reading-status glyph — the row that has to stay hittable.- // ANDed with the site filter above, it is Zephyr Court alone.- // The menu rows carry no identifiers and the reading side has a- // "Finished" too (`work-and-reading-status` Q23), so T-2353 has the- // app qualify this row's visible text as "Work: Finished".- chooseWorksOption("works-filter-work-status-finished", labelled: "Work: Finished", in: app)- let marked = app.buttons.matching(- NSPredicate(format: "label BEGINSWITH %@", "Open Work Zephyr Court")).firstMatch- XCTAssertTrue(- marked.waitForExistence(timeout: 15),- "A status filter narrows the list at largest Dynamic Type")- scrollToElement(marked, attempts: 8)- assertContentControl(marked, named: "A row wearing both status glyphs")- XCTAssertTrue(- marked.label.hasSuffix(". Work: Finished. Reading: Finished"),- "Req 5.5: the row names both marks — was \(marked.label)")-- // The menu still opens with the pills on screen, which is the state a- // reader is in when they go back to change or clear the filter.- menu.tap()- let sortRow = worksOptionRow("works-sort-newest", labelled: "Newest first", in: app)- XCTAssertTrue(- sortRow.waitForExistence(timeout: 10), "The menu reopens over a filtered list")+ assertContentControl(row, named: "A filtered work at largest Dynamic Type")+ XCTAssertTrue(row.label.contains("Reading: Finished")) } /// `work-and-reading-status` Req 10.2, the edit-mode half: at the largest@@ -353,8 +306,9 @@ final class AccessibilityJourneyUITests: XCTestCase { let works = app.tabControl(.works) XCTAssertTrue(works.waitForExistence(timeout: 30), "The Works tab is reachable") works.tap()+ openAllWorks(in: app) XCTAssertTrue(- app.collectionViews["works-list"].waitForExistence(timeout: 15),+ app.anyElement("works-group-allWorks").waitForExistence(timeout: 15), "Works lists the seeded library") let abandoned = app.buttons.matching(@@ -501,15 +455,16 @@ final class AccessibilityJourneyUITests: XCTestCase { let works = app.tabControl(.works) XCTAssertTrue(works.waitForExistence(timeout: 30), "The Works tab is reachable") works.tap()+ openAllWorks(in: app) XCTAssertTrue(- app.collectionViews["works-list"].waitForExistence(timeout: 15),+ app.anyElement("works-group-allWorks").waitForExistence(timeout: 15), "Works lists the seeded library") // Req 15.2's three toolbar controls. `assertSystemControl` for the // reason this file uses it on every bar item: a UIKit bar carries // system-managed hit slop outside its clipped visual frame. for identifier in [- "works-series-list-button", "works-list-options-menu", "works-new-work-button",+ "works-new-work-button", ] { assertSystemControl( app.buttons[identifier], named: "\(identifier) at largest Dynamic Type")@@ -617,15 +572,16 @@ final class AccessibilityJourneyUITests: XCTestCase { let works = app.tabControl(.works) XCTAssertTrue(works.waitForExistence(timeout: 30), "The Works tab is reachable") works.tap()+ openAllWorks(in: app) XCTAssertTrue(- app.collectionViews["works-list"].waitForExistence(timeout: 15),+ app.anyElement("works-group-allWorks").waitForExistence(timeout: 15), "Works lists the seeded library") // Req 12.2's four toolbar controls. `assertSystemControl` for the reason // this file uses it on every bar item: a UIKit bar carries // system-managed hit slop outside its clipped visual frame. for identifier in [- "works-series-list-button", "works-creators-list-button", "works-list-options-menu",+ "works-new-work-button", ] { assertSystemControl(@@ -633,7 +589,8 @@ final class AccessibilityJourneyUITests: XCTestCase { } // The creators list, and the field that makes one.- app.buttons["works-creators-list-button"].tap()+ app.goBack()+ scrollUntilTappableAndTap(app.buttons["works-destination-creators"], in: app, "Creators is reachable") XCTAssertTrue( app.anyElement("creator-list").waitForExistence(timeout: 15), "The creators list opens")@@ -1001,7 +958,7 @@ final class AccessibilityJourneyUITests: XCTestCase { works.tap() XCTAssertTrue(- app.collectionViews["works-list"].waitForExistence(timeout: 10),+ app.anyElement("works-group-allWorks").waitForExistence(timeout: 10), "Works list missing in \(appearance)") XCTAssertTrue( app.staticTexts["unattached-section-header"].waitForExistence(timeout: 10),@@ -1329,8 +1286,9 @@ final class AccessibilityJourneyUITests: XCTestCase { let works = app.tabControl(.works) XCTAssertTrue(works.waitForExistence(timeout: 30), "The Works tab is reachable") works.tap()+ openAllWorks(in: app) XCTAssertTrue(- app.collectionViews["works-list"].waitForExistence(timeout: 15),+ app.anyElement("works-group-allWorks").waitForExistence(timeout: 15), "Works lists the seeded library") let marrowLane = app.buttons.matching(@@ -1622,8 +1580,8 @@ final class WideLayoutAccessibilityUITests: XCTestCase { func testTheFiveReadingStatusSegmentsAreOperableInBothWideLayouts() { launch(scenario: "seeded-works-options") - selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor( app.buttons.matching( NSPredicate(format: "label BEGINSWITH %@", "Open Work Zephyr Court")).firstMatch,
diff --git a/Asterism/AsterismUITests/CharacterExtractionUITests.swift b/Asterism/AsterismUITests/CharacterExtractionUITests.swiftindex c915dc04..afba1d42 100644--- a/Asterism/AsterismUITests/CharacterExtractionUITests.swift+++ b/Asterism/AsterismUITests/CharacterExtractionUITests.swift@@ -55,8 +55,8 @@ final class CharacterExtractionUITests: XCTestCase { private func openWorkDetail() { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor( app.elements(withIdentifierPrefix: "work-row-").firstMatch, "The seeded work is listed").tap()@@ -800,8 +800,8 @@ final class CharacterExtractionOutcomeUITests: XCTestCase { private func openWorkDetail() { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor( app.elements(withIdentifierPrefix: "work-row-").firstMatch, "The seeded work is listed").tap()
diff --git a/Asterism/AsterismUITests/CreatorsUITests.swift b/Asterism/AsterismUITests/CreatorsUITests.swiftindex ed2aeae0..1c026718 100644--- a/Asterism/AsterismUITests/CreatorsUITests.swift+++ b/Asterism/AsterismUITests/CreatorsUITests.swift@@ -36,14 +36,14 @@ final class CreatorsUITests: XCTestCase { private func openWorks() { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") } /// Req 1.6: the list is reached from the Works toolbar, and from nowhere else. private func openCreatorList() {- openWorks()- waitFor(app.buttons["works-creators-list-button"], "The Works toolbar offers Creators")+ selectTab(.works, in: app)+ waitFor(app.buttons["works-destination-creators"], "The Works toolbar offers Creators") .tap() waitFor(app.anyElement("creator-list"), "The creators list opens") }@@ -243,7 +243,7 @@ final class CreatorsUITests: XCTestCase { app.anyElement("creator-detail"), "Req 4.6: Back from a work returns to the creator it was opened from") XCTAssertFalse(- app.collectionViews["works-list"].exists, "…rather than to the works list under it")+ app.anyElement("works-group-allWorks").exists, "…rather than to the works list under it") } // MARK: - The seeder
diff --git a/Asterism/AsterismUITests/EntryToWorkLinkUITests.swift b/Asterism/AsterismUITests/EntryToWorkLinkUITests.swiftindex f7560bf8..30823046 100644--- a/Asterism/AsterismUITests/EntryToWorkLinkUITests.swift+++ b/Asterism/AsterismUITests/EntryToWorkLinkUITests.swift@@ -108,8 +108,8 @@ final class EntryToWorkLinkUITests: XCTestCase { func testTheWorkNameOnAChapterLeavesTheChapterOnItsWork() { launch("seeded-composed") - selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor( app.elements(withIdentifierPrefix: "work-row-").firstMatch, "The taught work is listed" ).tap()@@ -129,7 +129,7 @@ final class EntryToWorkLinkUITests: XCTestCase { "…the whole of it, not just its note") assertWorkDetailIsOnScreen(titled: "Real Work", "…and the work is what is on screen") XCTAssertFalse(- app.collectionViews["works-list"].exists,+ app.anyElement("works-group-allWorks").exists, "Leaving a chapter for its work does not pop past the work") }
diff --git a/Asterism/AsterismUITests/SearchUITests.swift b/Asterism/AsterismUITests/SearchUITests.swiftindex 98d12898..5e479ab3 100644--- a/Asterism/AsterismUITests/SearchUITests.swift+++ b/Asterism/AsterismUITests/SearchUITests.swift@@ -71,12 +71,12 @@ final class SearchUITests: XCTestCase { func testWorksSearchNarrowsAndHidesTheUnattachedGroup() { launch("seeded-composed") waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor(app.staticTexts["unattached-section-header"], "Unattached notes start visible") type("Real Work")- waitFor(app.collectionViews["works-list"], "The matching work is still listed")+ waitFor(app.anyElement("works-group-allWorks"), "The matching work is still listed") XCTAssertEqual(workRows.count, 1, "The seeded work matches its own title") // Req 4.2 / Q12: unattached entries have no work title to match, so the // group is hidden outright rather than shown empty.@@ -88,8 +88,8 @@ final class SearchUITests: XCTestCase { func testWorksSearchWithNoMatchesShowsItsOwnEmptyState() { launch("seeded-composed") waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") type("zzqqxx") waitFor(
diff --git a/Asterism/AsterismUITests/SeriesUITests.swift b/Asterism/AsterismUITests/SeriesUITests.swiftindex cb0434af..a3b0852a 100644--- a/Asterism/AsterismUITests/SeriesUITests.swift+++ b/Asterism/AsterismUITests/SeriesUITests.swift@@ -39,15 +39,15 @@ final class SeriesUITests: XCTestCase { private func openWorks() { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") } /// Req 1.6: the list is reached from the Works toolbar, and from nowhere else. private func openSeriesList() {- openWorks()- waitFor(app.buttons["works-series-list-button"], "The Works toolbar offers Series").tap()- waitFor(app.anyElement("series-list"), "The series list opens")+ selectTab(.works, in: app)+ waitFor(app.buttons["works-tile-series"], "The Works toolbar offers Series").tap()+ waitFor(app.anyElement("series-index"), "The series list opens") } // MARK: - Elements@@ -58,11 +58,11 @@ final class SeriesUITests: XCTestCase { /// prefix and told apart by their labels — which `SeriesListView` composes as /// "{label}, {n} works", the only place the count is readable. private var seriesRows: XCUIElementQuery {- app.elements(withIdentifierPrefix: "series-row-")+ app.elements(withIdentifierPrefix: "series-card-") } private func seriesRow(labelled label: String) -> XCUIElement {- seriesRows.matching(NSPredicate(format: "label == %@", label)).firstMatch+ seriesRows.matching(NSPredicate(format: "label BEGINSWITH %@", label)).firstMatch } /// The two series share a name and a creation day, so only the count tells@@ -71,7 +71,7 @@ final class SeriesUITests: XCTestCase { private func seriesRow(named name: String, holding count: String) -> XCUIElement { seriesRows.matching( NSPredicate(- format: "label BEGINSWITH %@ AND label ENDSWITH %@", name, ", \(count)")+ format: "label BEGINSWITH %@ AND label CONTAINS %@", name, ", \(count)") ).firstMatch } @@ -167,6 +167,7 @@ final class SeriesUITests: XCTestCase { "…and a name nothing shares is unqualified, beside its count") // Req 1.1: the field and the button beside it create one.+ app.buttons["series-new-button"].tap() let field = waitFor(app.textFields["series-list-add-field"], "The list offers its field") field.tap() field.typeText("Tidepool")@@ -208,7 +209,7 @@ final class SeriesUITests: XCTestCase { "Req 1.4: the prompt states the count and what becomes of the members") waitFor(app.dialogButton("series-detail-delete-confirm"), "…and offers the deletion").tap() - waitFor(app.anyElement("series-list"), "The deleted series returns the reader to the list")+ waitFor(app.anyElement("series-index"), "The deleted series returns the reader to the list") waitUntilGone( seriesRow(labelled: "Ashfall Saga, 2 works"), "…without the series that was deleted")@@ -301,9 +302,10 @@ final class SeriesUITests: XCTestCase { XCTAssertEqual(memberRows.count, 2, "…on a series holding the two it started with") app.goBack()- waitFor(app.anyElement("series-list"), "Back returns to the series list")+ waitFor(app.anyElement("series-index"), "Back returns to the series list") app.goBack()- waitFor(app.collectionViews["works-list"], "…and again to the works list")+ waitFor(app.anyElement("works-hub"), "…and again to the hub")+ openAllWorks(in: app) waitFor( app.buttons.matching( NSPredicate(format: "label BEGINSWITH %@", "Open Work Ashfall on Stage")@@ -349,7 +351,7 @@ final class SeriesUITests: XCTestCase { app.anyElement("series-detail"), "Q49: Back from a member returns to the series it was opened from") XCTAssertFalse(- app.collectionViews["works-list"].exists,+ app.anyElement("works-group-allWorks").exists, "…rather than to the works list under it") }
diff --git a/Asterism/AsterismUITests/SitesSettingsUITests.swift b/Asterism/AsterismUITests/SitesSettingsUITests.swiftindex 72727c61..d1531e3d 100644--- a/Asterism/AsterismUITests/SitesSettingsUITests.swift+++ b/Asterism/AsterismUITests/SitesSettingsUITests.swift@@ -167,8 +167,8 @@ final class SitesSettingsUITests: XCTestCase { waitFor(app.buttons["settings-done-button"], "Settings closes from its own bar").tap() waitUntilGone(app.anyElement("settings-view"), "Settings is gone") - selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor( app.elements(withIdentifierPrefix: "work-row-").firstMatch, "The seeded work is listed"
diff --git a/Asterism/AsterismUITests/TodayUITests.swift b/Asterism/AsterismUITests/TodayUITests.swiftindex 3e41fa7f..c890c8d7 100644--- a/Asterism/AsterismUITests/TodayUITests.swift+++ b/Asterism/AsterismUITests/TodayUITests.swift@@ -830,7 +830,7 @@ final class TodayUITests: XCTestCase { app.tabBars.buttons["Today"].isSelected, "Q38: the push is on Today's own stack — it never switches to Works") XCTAssertFalse(- app.collectionViews["works-list"].exists, "…and the Works list is not what opened")+ app.anyElement("works-group-allWorks").exists, "…and the Works list is not what opened") app.goBack() // Q76 took the title and Q78 the caption, so the claim is made against@@ -885,7 +885,7 @@ final class TodayUITests: XCTestCase { app.tabBars.buttons["Today"].isSelected, "Q38: two screens deep and still on Today") XCTAssertFalse(- app.collectionViews["works-list"].exists, "…never by way of the Works list")+ app.anyElement("works-group-allWorks").exists, "…never by way of the Works list") app.goBack() waitFor(app.anyElement("work-detail-pulse"), "Back returns to the work", timeout: 20)
diff --git a/Asterism/AsterismUITests/UIJourneySupport.swift b/Asterism/AsterismUITests/UIJourneySupport.swiftindex 55bb6fa0..94cdd61f 100644--- a/Asterism/AsterismUITests/UIJourneySupport.swift+++ b/Asterism/AsterismUITests/UIJourneySupport.swift@@ -72,52 +72,6 @@ extension XCUIApplication { } } -/// Which of several same-labelled rows of the Works options menu a caller-/// means, named by a uniquely labelled row of the same picker.-///-/// `.above("Has release days")` is "the `Any` directly above that row", which-/// is the Release days picker's own `Any` and not one of the other eight.-enum WorksOptionNeighbour {- case above(String)- case below(String)-- var label: String {- switch self {- case let .above(label), let .below(label): label- }- }-- /// How far from its anchor a candidate may sit and still be taken as that- /// anchor's neighbour, in multiples of the **anchor row's own height** — so- /// it scales with Dynamic Type instead of pinning a point distance.- ///- /// Three, which is the one number that fits every call site in- /// `WorksView.optionsMenu`'s order. Counting rows, and remembering that- /// each inline picker's title is drawn as a section header that takes space- /// without being a button:- ///- /// - `.above("Has release days")` → the Release days `Any`, **two** rows up- /// (`Any`, `No release days`, `Has release days`). The widest gap anyone- /// asks for, and the reason the bound is not two.- /// - `.above("No creators")` → the Creator `Any`, one row up. The nearest- /// wrong `Any` is the Series picker's, three rows and a header further.- /// - `.below("Ongoing")` → the Work status `Finished`, one row down. The- /// reading side's `Finished` is six rows and a header below it.- /// - `.below("Catching up")` → the Reading status `Finished`, one row down.- /// No other `Finished` is below it at all.- ///- /// So every intended row is at two or less and every wrong one at more than- /// three and a half. Verified on `iPhone Air` at the default text size and,- /// for the first `.below("Ongoing")` site, at AXXXL.- ///- /// **T-2353** qualified the app's own visible text for every row these four- /// examples named, so no call site in this repository passes `nextTo`- /// any more — `WorksOptionNeighbour`/`nextTo` are unexercised, kept as- /// general infrastructure for a future dimension whose label collides- /// (`specs/works-list-options/decision_log.md` Decision 1).- static let rowSpan: CGFloat = 3-}- extension XCTestCase { /// Waits for whichever control selects `tab` in the layout on screen, taps /// it, and returns it.@@ -431,189 +385,40 @@ extension XCTestCase { file: file, line: line) } - /// One row of the Works list's sort-and-filter menu (`works-list-options`).- ///- /// The identifiers are set on the `Text` inside each inline `Picker`, and- /// SwiftUI does not always carry one onto the menu item it builds from it —- /// the work editor's type picker is driven by its visible label for exactly- /// that reason (`WorkDetailActionsUITests`). Preferring the identifier and- /// falling back to the label lets either spelling drive the row.- ///- /// **For this menu the fallback is the only path.** Measured on 2026-09-21- /// by dumping every button in the open popover: not one picker row carries- /// its identifier — `works-sort-newest`, `works-filter-site-alpha.test`,- /// `works-filter-release-days-any` and the rest all resolve to nothing, and- /// the only identifier that survives into the menu is- /// `works-list-group-by-series`, which is a `Toggle` rather than a `Picker`- /// row. Every choice this helper has ever made was made by label.- ///- /// **Which matters because two of the labels are not unique**: every one of- /// the eight `filterPicker` rows in `WorksView.optionsMenu` draws an `Any`- /// row — the Sort picker is the ninth picker and the one that draws none —- /// and both status vocabularies have a- /// `Finished` (`work-and-reading-status` Q23 is about exactly that pair).- /// The rows are drawn in a lazy collection view, so how many same-labelled- /// rows are in the tree at once depends on where the menu is scrolled —- /// which is why `app.buttons["Finished"]`, a subscript that *raises* on a- /// query matching more than one element, resolved to one row for as long as- /// it did. `to-read`'s fifth reading status moved every offset below Work- /// status by 42 pt, and two `WorksListOptionsUITests` cases started dying- /// with `Multiple matching elements found` — reported as "The menu offers- /// Any" / "The menu offers Finished", which reads like a missing row rather- /// than an ambiguous one.- ///- /// So a caller whose label is shared names a **uniquely labelled neighbour- /// in the same picker** and gets the occurrence nearest to it on the named- /// side — **and only when that occurrence is within- /// ``WorksOptionNeighbour/rowSpan`` anchor row heights of the anchor**. That- /// is a claim about the menu's own order, which is the production view's- /// (`WorksView.optionsMenu`), rather than about how far the popover happens- /// to be scrolled.- ///- /// The bound is what makes the claim honest. `.above`/`.below` otherwise- /// take the nearest *materialised* same-labelled row at any distance, so a- /// tree in which the intended row is not drawn yet answers another picker's- /// row — an `Any` seven rows away is still "the nearest one above". Out of- /// bound, and without a neighbour at all, an ambiguous label resolves to the- /// (absent) identifier element, so the walk keeps scrolling and a genuine- /// miss fails by name rather than tapping whichever row came first and- /// quietly changing a different dimension.- ///- /// **T-2353, after this was written: the "identifier reads empty" half of- /// the diagnosis above sharpened into a standing regression** —- /// `app.buttons["Finished"]` and `app.buttons["Any"]` went from *raising*- /// on more than one match to reporting `exists` true and `isHittable`- /// false forever, so the 8-swipe loop this feeds gave up on a row that was- /// on screen the whole time. The fix is at the source: `WorksView.filterPicker`- /// now qualifies the rows' own visible text — the only string that reaches- /// XCUI or VoiceOver on this menu — so `Any` reads per dimension ("Any- /// type", "Any site", …) and every row of the two status pickers wears- /// its pill's spelling ("Work: Finished", "Reading: Finished", "Reading:- /// To read", …). No call site in this repository passes `nextTo`- /// any more, because no row's label collides with another's; this- /// mechanism stays as the fallback for a future dimension whose label- /// does, rather than being deleted with the only rows it was ever needed- /// for.- func worksOptionRow(- _ identifier: String, labelled label: String,- nextTo neighbour: WorksOptionNeighbour? = nil, in app: XCUIApplication- ) -> XCUIElement {- let byIdentifier = app.anyElement(identifier)- if byIdentifier.exists { return byIdentifier }- let candidates = app.buttons.matching(NSPredicate(format: "label == %@", label))- .allElementsBoundByIndex- guard let neighbour else {- return candidates.count == 1 ? candidates[0] : byIdentifier- }- // Resolved through the neighbour even when only one candidate is in the- // tree: the other occurrence may simply not be materialised yet, and- // taking the lone one on trust is how a `Finished` tap lands on the- // wrong dimension.- let anchors = app.buttons.matching(NSPredicate(format: "label == %@", neighbour.label))- .allElementsBoundByIndex- guard anchors.count == 1 else { return byIdentifier }- // Every `frame` is an accessibility round trip, so each element's is- // read exactly once and carried as a number from here on.- let anchorFrame = anchors[0].frame- let anchorY = anchorFrame.minY- let bound = anchorFrame.height * WorksOptionNeighbour.rowSpan- let ordered = candidates.map { (element: $0, minY: $0.frame.minY) }- .sorted { $0.minY < $1.minY }- switch neighbour {- case .above:- return ordered.last { anchorY - $0.minY > 0 && anchorY - $0.minY <= bound }?.element- ?? byIdentifier- case .below:- return ordered.first { $0.minY - anchorY > 0 && $0.minY - anchorY <= bound }?.element- ?? byIdentifier+ /// Open a library destination explicitly; selecting the tab alone shows the hub.+ func openAllWorks(in app: XCUIApplication) {+ selectTab(.works, in: app)+ let all = app.buttons["works-destination-allWorks"]+ if all.waitForExistence(timeout: 5) {+ if app.buttons["sidebar-works"].exists {+ // The iPad hub reports visible buttons as non-hittable, while+ // a tap at their actual frame works. Bound the tap to the list+ // column and verify the destination below.+ let column = app.anyElement("wide-list-column")+ for _ in 0..<8 where !column.frame.contains(all.frame) {+ app.scrollViews["works-hub"].swipeUp()+ }+ XCTAssertTrue(column.frame.contains(all.frame), "All works is visible in its column")+ all.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)).tap()+ } else {+ scrollUntilTappableAndTap(all, in: app, "All works is reachable from the hub")+ } }+ waitFor(app.anyElement("works-group-allWorks"), "All works opens") } - /// Opens the Works options menu and chooses one row.- ///- /// The row is re-resolved on every attempt rather than held, because a menu- /// row below the fold is not in the accessibility tree at all — which is the- /// ordinary case at the accessibility text sizes, where four sections of- /// rows do not fit on a phone.- ///- /// `nextTo` is for the rows whose label is shared with another picker's;- /// see ``worksOptionRow(_:labelled:nextTo:in:)``.- func chooseWorksOption(- _ identifier: String, labelled label: String,- nextTo neighbour: WorksOptionNeighbour? = nil, in app: XCUIApplication,- file: StaticString = #filePath, line: UInt = #line- ) {- scrollUntilTappableAndTap(- app.anyElement("works-list-options-menu"), in: app,- "The Works toolbar offers the sort and filter menu", file: file, line: line)- // Give the menu its presentation animation before the first look: a row- // that is not in the tree yet cannot be told apart from one that is- // below the fold.- //- // The wait is on a **lazy label query**, and only ever waited on — it- // is never the element that is tapped. `worksOptionRow` answers the- // *identifier* element whenever it declines to resolve, and no menu row- // carries its identifier, so waiting on its answer would sit out the- // whole timeout at every one of the ~35 call sites before doing- // anything. `firstMatch` is ambiguity-tolerant (unlike the `[label]`- // subscript, which raises), and "some row with this label exists" is- // all the presentation animation needs proving.- _ = app.buttons.matching(NSPredicate(format: "label == %@", label)).firstMatch- .waitForExistence(timeout: 5)- for _ in 0..<8 {- let row = worksOptionRow(identifier, labelled: label, nextTo: neighbour, in: app)- if row.exists, row.isHittable {- row.tap()- waitUntilGone(- row, "Choosing \(label) closes the menu", timeout: 10, file: file, line: line)- return- }- scrollWorksOptionsMenu(in: app)- }- XCTFail("The menu offers \(label)", file: file, line: line)+ func chooseWorksToken(_ dimension: String, labelled label: String, in app: XCUIApplication) {+ let field = searchField(in: app)+ field.tap()+ field.typeText(dimension + ":")+ let suggestion = app.descendants(matching: .any).matching(+ NSPredicate(format: "label BEGINSWITH %@", label)).firstMatch+ scrollUntilTappableAndTap(suggestion, in: app, "Search offers \(label)") } - /// Scrolls the open sort-and-filter menu by about one of its pages.- ///- /// **`velocity: .slow`, and it is load-bearing.** The menu is a *clipped- /// popover*: every one of its rows is in the accessibility tree at its- /// content position whether or not it is visible, so "exists" says nothing- /// about whether a row can be tapped. On a 402×874 window the popover showed- /// y 92–552 while the Site rows sat at y 618–702 — present, and not hittable.- ///- /// A default `app.swipeUp()` then moves the menu by roughly **two** of those- /// pages, so once `series-and-related-works` added a sixth picker and the- /// group toggle, the Site rows fell between two looks: skipped in one- /// gesture, and gone for good, because this loop only ever scrolls one way.- /// That is three `WorksListOptionsUITests` failures, deterministic, with the- /// row sitting in the tree the whole time.- ///- /// Measured over the whole menu, one gesture per step: a slow swipe shows- /// the top through `tag-mystery`, then `tag-mystery` through- /// `reading-status-reading` — overlapping, nothing stepped over — and then- /// the foot. Two other gestures were measured and rejected: a coordinate- /// drag starting below the popover **dismisses** the menu, and a press-drag- /// anchored on a menu row does not scroll it at all (UIKit tracks the row- /// instead).- ///- /// **That three-step sweep was measured before `update-schedule` added the- /// ninth picker, Release days, below Reading status** (Req 11.1), so- /// `reading-status-reading` is no longer the foot and the menu is one- /// picker taller than the sweep above describes. The 8-swipe loop in- /// ``chooseWorksOption(_:labelled:in:file:line:)`` has **not** been- /// re-measured against the taller menu; it is eight looks where three- /// sufficed, so the Release days rows are reached with room to spare, but- /// the step-by-step overlap is a claim about the old menu only. Re-measure- /// it, the way `series-and-related-works` did, if a tenth dimension lands- /// or a row starts being stepped over.- ///- /// **The menu does open at its head every time**, measured on 2026-09-21- /// over the run that added the fifth reading status: with `Has release- /// days` chosen in the last picker, the reopened popover still showed- /// `Newest first` at y 78. So a one-way walk is enough and the row a walk- /// cannot reach is an ambiguous label rather than a row behind it.- private func scrollWorksOptionsMenu(in app: XCUIApplication) {- app.swipeUp(velocity: .slow)+ func chooseWorksSort(_ label: String, in app: XCUIApplication) {+ app.buttons["works-group-sort-menu"].tap()+ waitFor(app.buttons[label], "Sort offers \(label)").tap() } /// The navigation bar's search field.
diff --git a/Asterism/AsterismUITests/WideLayoutUITests.swift b/Asterism/AsterismUITests/WideLayoutUITests.swiftindex 11edbfd1..6acd8687 100644--- a/Asterism/AsterismUITests/WideLayoutUITests.swift+++ b/Asterism/AsterismUITests/WideLayoutUITests.swift@@ -321,8 +321,8 @@ final class WideLayoutUITests: XCTestCase { launch("seeded-characters", orientation: .landscapeLeft) waitForLibrary() - selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor( app.elements(withIdentifierPrefix: "work-row-").firstMatch, "The seeded work is listed" ).tap()@@ -358,7 +358,7 @@ final class WideLayoutUITests: XCTestCase { let placePill = app.anyElement("work-detail-place") scrollUntilPresent(placePill, in: app, "The Places section draws in the wide layout") assertInsideColumn(placePill, column: detailColumn, what: "The kept place's pill")- waitFor(app.collectionViews["works-list"], "…with the works list still beside it")+ waitFor(app.anyElement("works-hub"), "…with the hub still beside it") } // MARK: - Q57 — a chapter replaces its work in the detail column@@ -375,8 +375,8 @@ final class WideLayoutUITests: XCTestCase { launch("seeded-composed", orientation: .landscapeLeft) waitForLibrary() - selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor( app.elements(withIdentifierPrefix: "work-row-").firstMatch, "The seeded work is listed" ).tap()@@ -390,7 +390,7 @@ final class WideLayoutUITests: XCTestCase { app.anyElement("entry-detail-note-editor"), "The chapter opened", timeout: 20) assertInsideColumn(editor, column: detailColumn, what: "The chapter entry (Q57)") // The whole point of the ruling: the pane is not taken over.- waitFor(app.collectionViews["works-list"], "The works list is still beside it (Q57)")+ waitFor(app.anyElement("works-group-allWorks"), "The works list is still beside it (Q57)") waitFor(app.anyElement("wide-list-column"), "…and its column is still laid out") waitFor(app.anyElement("sidebar-works"), "…as is the sidebar") XCTAssertFalse(@@ -460,7 +460,7 @@ final class WideLayoutUITests: XCTestCase { app.anyElement("sidebar-today").isSelected, "Q77: a work opened from Today stays on Today's pane") XCTAssertFalse(- app.collectionViews["works-list"].exists,+ app.anyElement("works-group-allWorks").exists, "…so the Works pane is not selected behind it") waitFor( app.anyElement("today-week-range"),@@ -603,8 +603,8 @@ final class WideLayoutUITests: XCTestCase { launch("seeded-taught", orientation: .landscapeLeft) waitForLibrary() - selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "The sidebar row selects the Works tab")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "The sidebar row selects the Works tab") waitFor(app.anyElement("sidebar-today"), "And the sidebar stays where it is") } @@ -625,8 +625,8 @@ final class WideLayoutUITests: XCTestCase { launch("seeded-works-options", orientation: .landscapeLeft) waitForLibrary() - selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor( app.buttons.matching( NSPredicate(format: "label BEGINSWITH %@", "Open Work Zephyr Court")).firstMatch,@@ -654,13 +654,13 @@ final class WideLayoutUITests: XCTestCase { /// a name in that fixture and the ordinal telling them apart is assigned by /// identifier order, so the count is what a test can name them by. private var heldSeriesRow: XCUIElement {- app.elements(withIdentifierPrefix: "series-row-").matching(- NSPredicate(format: "label ENDSWITH %@", ", 2 works")).firstMatch+ app.elements(withIdentifierPrefix: "series-card-").matching(+ NSPredicate(format: "label CONTAINS %@", ", 2 works")).firstMatch } private func openWorksList() {- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") } /// Decision 7's stack in the wide tree: the series list and a series screen@@ -676,13 +676,14 @@ final class WideLayoutUITests: XCTestCase { waitForLibrary() openWorksList() - waitFor(app.buttons["works-series-list-button"], "The Works toolbar offers Series").tap()+ app.buttons["works-group-back"].tap()+ waitFor(app.buttons["works-tile-series"], "The Works toolbar offers Series").tap() let detailColumn = waitFor( app.anyElement("wide-detail-column"), "The detail column is laid out") let list = waitFor(- app.collectionViews["series-list"], "Req 1.6: the series list fills the detail column")+ app.collectionViews["series-index"], "Req 1.6: the series list fills the detail column") assertInsideColumn(list, column: detailColumn, what: "The series list (Req 1.6)")- waitFor(app.collectionViews["works-list"], "…with the works list still beside it")+ waitFor(app.anyElement("works-hub"), "…with the hub still beside it") waitFor(app.anyElement("wide-list-column"), "…and its column still laid out") waitFor(heldSeriesRow, "The series holding two works is listed").tap()@@ -691,12 +692,12 @@ final class WideLayoutUITests: XCTestCase { "Req 3.1: the series screen replaces the list in the same column") assertInsideColumn(series, column: detailColumn, what: "The series screen (Req 3.1)") XCTAssertFalse(- app.collectionViews["series-list"].exists,+ app.collectionViews["series-index"].exists, "…rather than stacking over the list it was opened from")- waitFor(app.collectionViews["works-list"], "…and the works list is still beside it")+ waitFor(app.anyElement("works-hub"), "…and the hub is still beside it") waitFor(app.anyElement("column-back"), "The series offers the way back").tap()- waitFor(app.collectionViews["series-list"], "Back returns to the series list")+ waitFor(app.collectionViews["series-index"], "Back returns to the series list") waitFor(app.anyElement("column-back"), "…which offers its own way back").tap() waitFor( app.anyElement("wide-detail-placeholder"),@@ -750,8 +751,9 @@ final class WideLayoutUITests: XCTestCase { waitForLibrary() openWorksList() - waitFor(app.buttons["works-series-list-button"], "The Works toolbar offers Series").tap()- waitFor(app.collectionViews["series-list"], "The series list is in the detail column")+ app.buttons["works-group-back"].tap()+ waitFor(app.buttons["works-tile-series"], "The Works toolbar offers Series").tap()+ waitFor(app.collectionViews["series-index"], "The series list is in the detail column") waitFor(heldSeriesRow, "The series holding two works is listed").tap() waitFor(app.collectionViews["series-detail"], "…and the series screen after it") @@ -768,7 +770,8 @@ final class WideLayoutUITests: XCTestCase { // MARK: - `work-creators` Reqs 1.6, 4.6 — the creator routes private func openCreatorsList() {- waitFor(app.buttons["works-creators-list-button"], "The Works toolbar offers Creators")+ if app.buttons["works-group-back"].exists { app.buttons["works-group-back"].tap() }+ waitFor(app.buttons["works-destination-creators"], "The Works toolbar offers Creators") .tap() } @@ -799,7 +802,7 @@ final class WideLayoutUITests: XCTestCase { app.collectionViews["creator-list"], "Req 1.6: the creators list fills the detail column") assertInsideColumn(list, column: detailColumn, what: "The creators list (Req 1.6)")- waitFor(app.collectionViews["works-list"], "…with the works list still beside it")+ waitFor(app.anyElement("works-hub"), "…with the hub still beside it") waitFor(app.anyElement("wide-list-column"), "…and its column still laid out") waitFor(moriRow, "The creator credited on three works is listed").tap()@@ -810,7 +813,7 @@ final class WideLayoutUITests: XCTestCase { XCTAssertFalse( app.collectionViews["creator-list"].exists, "…rather than stacking over the list it was opened from")- waitFor(app.collectionViews["works-list"], "…and the works list is still beside it")+ waitFor(app.anyElement("works-hub"), "…and the hub is still beside it") waitFor(app.anyElement("column-back"), "The creator offers the way back").tap() waitFor(app.collectionViews["creator-list"], "Back returns to the creators list")
diff --git a/Asterism/AsterismUITests/WorkCoverUITests.swift b/Asterism/AsterismUITests/WorkCoverUITests.swiftindex 12ea6f62..356cba5b 100644--- a/Asterism/AsterismUITests/WorkCoverUITests.swift+++ b/Asterism/AsterismUITests/WorkCoverUITests.swift@@ -59,8 +59,8 @@ final class WorkCoverUITests: XCTestCase { /// Find cover journeys below start from. private func openCoveredWorkEditor() { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor(row(titled: coveredTitle), "The covered work is listed").tap() waitFor(app.anyElement("work-detail-pulse"), "The covered work opens", timeout: 20) waitFor(app.buttons["work-detail-edit-button"], "View mode offers the editor").tap()@@ -178,8 +178,8 @@ final class WorkCoverUITests: XCTestCase { // MARK: The works list (Req 6.1) - selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") let covered = waitFor(row(titled: coveredTitle), "The covered work is listed") let uncovered = waitFor(row(titled: uncoveredTitle), "…and the uncovered one") @@ -431,8 +431,8 @@ final class WorkCoverUITests: XCTestCase { func testALongPressOnTheHeaderCoverOpensItOnItsOwn() { launch() waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor(row(titled: coveredTitle), "The covered work is listed").tap() waitFor(app.anyElement("work-detail-pulse"), "The covered work opens", timeout: 20) @@ -462,8 +462,8 @@ final class WorkCoverUITests: XCTestCase { func testAnUncoveredWorkSaysSoAndOffersNoRemove() { launch() waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor(row(titled: uncoveredTitle), "The uncovered work is listed").tap() waitFor(app.anyElement("work-detail-pulse"), "It opens", timeout: 20) @@ -506,8 +506,8 @@ final class WorkCoverUITests: XCTestCase { func testARowWhoseCoverBytesAreAbsentDrawsNoSlot() { launchMissingBytes() waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") let claiming = waitFor(row(titled: coveredTitle), "The work that claims a cover is listed") let uncovered = waitFor(row(titled: uncoveredTitle), "…and the one that claims none")@@ -555,8 +555,8 @@ final class WorkCoverUITests: XCTestCase { func testTheCoverViewerIsUnreachableWhenTheBytesAreAbsent() { launchMissingBytes() waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") waitFor(row(titled: coveredTitle), "The work that claims a cover is listed").tap() waitFor(app.anyElement("work-detail-pulse"), "It opens", timeout: 20)
diff --git a/Asterism/AsterismUITests/WorkDetailActionsUITests.swift b/Asterism/AsterismUITests/WorkDetailActionsUITests.swiftindex 536e0272..0dcebfe0 100644--- a/Asterism/AsterismUITests/WorkDetailActionsUITests.swift+++ b/Asterism/AsterismUITests/WorkDetailActionsUITests.swift@@ -41,8 +41,8 @@ final class WorkDetailActionsUITests: XCTestCase { private func openWorksTab() { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") } private func openWorkDetail() {@@ -171,7 +171,7 @@ final class WorkDetailActionsUITests: XCTestCase { app.textFields["work-detail-title-field"], "The X returns to view mode") waitFor(app.anyElement("work-detail-pulse"), "…on the same screen") XCTAssertFalse(- app.collectionViews["works-list"].exists,+ app.anyElement("works-group-allWorks").exists, "The X does not pop the work detail") XCTAssertFalse( systemNavigationBarControls.isEmpty,@@ -256,7 +256,7 @@ final class WorkDetailActionsUITests: XCTestCase { waitFor(app.anyElement("work-detail-title"), "Back lands on the work detail") waitFor(app.anyElement("work-detail-pulse"), "…the whole of it, not a fragment") XCTAssertFalse(- app.collectionViews["works-list"].exists,+ app.anyElement("works-group-allWorks").exists, "Back from a chapter entry does not skip the work it was opened from") } @@ -278,7 +278,7 @@ final class WorkDetailActionsUITests: XCTestCase { app.buttons["entry-detail-update-button"], "The chapter dismisses after the update") waitFor(app.anyElement("work-detail-title"), "…and lands on the work detail") XCTAssertFalse(- app.collectionViews["works-list"].exists,+ app.anyElement("works-group-allWorks").exists, "A landed update does not skip the work the chapter was opened from") } @@ -367,7 +367,7 @@ final class WorkDetailActionsUITests: XCTestCase { // editor, which is where the delete was asked for. waitFor(app.buttons["work-detail-save-button"], "The editor is still on screen") XCTAssertFalse(- app.collectionViews["works-list"].exists,+ app.anyElement("works-group-allWorks").exists, "Cancelling does not dismiss the detail screen") } @@ -384,7 +384,7 @@ final class WorkDetailActionsUITests: XCTestCase { app.dialogButton("work-detail-delete-detach"), "The detach disposition is offered" ).tap() - waitFor(app.collectionViews["works-list"], "A committed deletion dismisses the screen")+ waitFor(app.anyElement("works-group-allWorks"), "A committed deletion dismisses the screen") waitUntilGone(workRows.firstMatch, "The work is gone from the Works tab") let landed = expectation(@@ -410,7 +410,7 @@ final class WorkDetailActionsUITests: XCTestCase { app.dialogButton("work-detail-delete-entries"), "The delete-too disposition is offered" ).tap() - waitFor(app.collectionViews["works-list"], "A committed deletion dismisses the screen")+ waitFor(app.anyElement("works-group-allWorks"), "A committed deletion dismisses the screen") waitUntilGone(workRows.firstMatch, "The work is gone from the Works tab") XCTAssertEqual( unattachedRows.count, 1,
diff --git a/Asterism/AsterismUITests/WorkDetailConnectionsUITests.swift b/Asterism/AsterismUITests/WorkDetailConnectionsUITests.swiftindex 6b460e04..47a0b7c3 100644--- a/Asterism/AsterismUITests/WorkDetailConnectionsUITests.swift+++ b/Asterism/AsterismUITests/WorkDetailConnectionsUITests.swift@@ -38,8 +38,8 @@ final class WorkDetailConnectionsUITests: XCTestCase { private func openWorks() { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") } private func openWork(_ title: String) {@@ -164,15 +164,16 @@ final class WorkDetailConnectionsUITests: XCTestCase { "Req 2.3: the cancelled assignment was not applied") app.goBack()- waitFor(app.collectionViews["works-list"], "The list is back")- waitFor(app.buttons["works-series-list-button"], "The Works toolbar offers Series").tap()- waitFor(app.anyElement("series-list"), "The series list opens")+ waitFor(app.anyElement("works-group-allWorks"), "The list is back")+ app.goBack()+ waitFor(app.buttons["works-tile-series"], "The Works toolbar offers Series").tap()+ waitFor(app.anyElement("series-index"), "The series list opens") waitFor(- app.elements(withIdentifierPrefix: "series-row-").matching(- NSPredicate(format: "label == %@", "Marginalia, 0 works")).firstMatch,+ app.elements(withIdentifierPrefix: "series-card-").matching(+ NSPredicate(format: "label BEGINSWITH %@", "Marginalia, 0 works")).firstMatch, "Q16: the series created from a cancelled edit is in the library") app.goBack()- waitFor(app.collectionViews["works-list"], "…and Back returns to the works list")+ openAllWorks(in: app) // Req 2.3: choosing a series shows the position field, prefilled with 1 // for an empty series. "Quiet Shelf" is the name nothing shares, so the
diff --git a/Asterism/AsterismUITests/WorkDetailCreditsUITests.swift b/Asterism/AsterismUITests/WorkDetailCreditsUITests.swiftindex 82ea2498..fafce1fd 100644--- a/Asterism/AsterismUITests/WorkDetailCreditsUITests.swift+++ b/Asterism/AsterismUITests/WorkDetailCreditsUITests.swift@@ -39,8 +39,8 @@ final class WorkDetailCreditsUITests: XCTestCase { private func openWorks() { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") } private func openWork(_ title: String) {@@ -251,8 +251,9 @@ final class WorkDetailCreditsUITests: XCTestCase { creditRows.count, 0, "Req 3.2: the cancelled credit was not applied") app.goBack()- waitFor(app.collectionViews["works-list"], "The list is back")- waitFor(app.buttons["works-creators-list-button"], "The Works toolbar offers Creators")+ waitFor(app.anyElement("works-group-allWorks"), "The list is back")+ app.goBack()+ waitFor(app.buttons["works-destination-creators"], "The Works toolbar offers Creators") .tap() waitFor( app.elements(withIdentifierPrefix: "creator-row-").matching(
diff --git a/Asterism/AsterismUITests/WorkDetailStatusUITests.swift b/Asterism/AsterismUITests/WorkDetailStatusUITests.swiftindex ac388953..c6c78100 100644--- a/Asterism/AsterismUITests/WorkDetailStatusUITests.swift+++ b/Asterism/AsterismUITests/WorkDetailStatusUITests.swift@@ -89,8 +89,8 @@ final class WorkDetailStatusUITests: XCTestCase { /// `docs/agent-notes/testing.md` prescribes for exactly that shape. private func openWork(_ title: String) { waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") let target = row(titled: title) scrollUntilPresent(target, in: app, "\(title) is listed") let tabBar = app.tabBars.firstMatch
diff --git a/Asterism/AsterismUITests/WorksAndAssignmentUITests.swift b/Asterism/AsterismUITests/WorksAndAssignmentUITests.swiftindex cf17f913..1717ac16 100644--- a/Asterism/AsterismUITests/WorksAndAssignmentUITests.swift+++ b/Asterism/AsterismUITests/WorksAndAssignmentUITests.swift@@ -21,8 +21,9 @@ final class WorksAndAssignmentUITests: XCTestCase { let worksTab = app.tabControl(.works) XCTAssertTrue(worksTab.waitForExistence(timeout: 30), "Works tab not found") worksTab.tap()+ openAllWorks(in: app) - let worksList = app.collectionViews["works-list"]+ let worksList = app.anyElement("works-group-allWorks") XCTAssertTrue(worksList.waitForExistence(timeout: 10), "Expected Works list view after tab selection") } @@ -30,6 +31,7 @@ final class WorksAndAssignmentUITests: XCTestCase { let worksTab = app.tabControl(.works) XCTAssertTrue(worksTab.waitForExistence(timeout: 30), "Works tab not found") worksTab.tap()+ openAllWorks(in: app) let newWorkButton = app.buttons["works-new-work-button"] XCTAssertTrue(@@ -42,6 +44,7 @@ final class WorksAndAssignmentUITests: XCTestCase { let worksTab = app.tabControl(.works) XCTAssertTrue(worksTab.waitForExistence(timeout: 30), "Works tab not found") worksTab.tap()+ openAllWorks(in: app) let unattachedHeader = app.staticTexts["unattached-section-header"] XCTAssertTrue(@@ -54,6 +57,7 @@ final class WorksAndAssignmentUITests: XCTestCase { let worksTab = app.tabControl(.works) XCTAssertTrue(worksTab.waitForExistence(timeout: 30), "Works tab not found") worksTab.tap()+ openAllWorks(in: app) let newWorkButton = app.buttons["works-new-work-button"] XCTAssertTrue(newWorkButton.waitForExistence(timeout: 10))
diff --git a/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift b/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swiftindex 47f5ca99..5107d442 100644--- a/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift+++ b/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift@@ -1,215 +1,35 @@ import XCTest -/// The Works list's creator dimension (`work-creators` Req 5.1), driven from-/// app launch.-///-/// The filter itself is `WorksListOptions`' and has its own unit tests-/// (`WorksListOptionsTests`). What only a journey can prove is that the seventh-/// picker is reachable in the menu the other six live in, that it offers only-/// the creators something in the list is actually credited to, that its pill-/// reads back the row that set it, and that a combination no work carries-/// explains itself with the filter empty state rather than the search one.-///-/// `seeded-creators` is the fixture and `seeded-series` is deliberately left-/// alone: that scenario's suites assert exact orders a credit would move. final class WorksCreatorOptionsUITests: XCTestCase { let app = XCUIApplication()-- /// The whole list under the opening sort. Newest first — the fixture's works- /// were captured in the reverse of this order, and none of them is abandoned,- /// so nothing sinks.- private let newestOrder = ["Quiet Tide", "Salt and Ember", "Nightjar Bay", "Lantern Song"]- override func setUp() { continueAfterFailure = false XCUIDevice.shared.orientation = .portrait terminateAndWaitForExit(app)- }-- override func tearDown() {- terminateAndWaitForExit(app)- }-- // MARK: - Driving-- private func launch() { app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-creators" app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString app.launch() }-- private func openWorks() {- waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")- }-- private var workRows: XCUIElementQuery {- app.elements(withIdentifierPrefix: "work-row-")- }-- private var optionsMenu: XCUIElement {- app.buttons["works-list-options-menu"]- }-- /// The work titles the list is showing, in the order it is showing them.- private func listedTitles() -> [String] {- let rows = workRows- return (0..<rows.count).compactMap { index in- let label = rows.element(boundBy: index).label- guard let opened = label.range(of: "Open Work "), opened.lowerBound == label.startIndex,- let site = label.range(of: " from ")- else { return nil }- return String(label[opened.upperBound..<site.lowerBound])- }- }-- private func assertListed(- _ expected: [String], _ message: String,- file: StaticString = #filePath, line: UInt = #line- ) {- let settled = XCTNSPredicateExpectation(- predicate: NSPredicate { _, _ in self.listedTitles() == expected }, object: nil)- guard XCTWaiter().wait(for: [settled], timeout: 15) == .completed else {- XCTFail("\(message) — was \(listedTitles())", file: file, line: line)- return- }- }-- /// Opens the options menu, and leaves it open for the caller to read.- ///- /// The menu is a clipped popover: every row is in the accessibility tree at- /// its content position whether or not it is visible, so an **absence**- /// check against an open menu is sound while a hittability check is not- /// (docs/agent-notes/testing.md).- private func openOptionsMenu(file: StaticString = #filePath, line: UInt = #line) {- scrollUntilTappableAndTap(- optionsMenu, in: app, "The Works toolbar offers the sort and filter menu",- file: file, line: line)- }-- /// Chooses the open menu's row whose label is exactly `label`.- ///- /// `chooseWorksOption` cannot serve for a creator row: its identifier- /// carries the creator's uuid, which no test can know. Creator names carry- /// no qualifier (two active creators cannot share a normalized name), so the- /// name alone names the row. The query is restricted to buttons, which the- /// menu's rows are and the filter pills are not.- private func chooseOpenMenuRow(- labelled label: String, file: StaticString = #filePath, line: UInt = #line- ) {- let row = app.buttons.matching(NSPredicate(format: "label == %@", label))- _ = row.firstMatch.waitForExistence(timeout: 5)- for _ in 0..<8 {- let candidate = row.firstMatch- if candidate.exists, candidate.isHittable {- candidate.tap()- waitUntilGone(- candidate, "Choosing \(label) closes the menu", timeout: 10,- file: file, line: line)- return+ override func tearDown() { terminateAndWaitForExit(app) }+ private func assertTitles(_ titles: [String]) {+ let query = app.elements(withIdentifierPrefix: "work-row-")+ let expectation = XCTNSPredicateExpectation(predicate: NSPredicate { _, _ in+ query.count == titles.count && titles.allSatisfy { title in+ query.matching(NSPredicate(format: "label BEGINSWITH %@", "Open Work " + title + " ")).firstMatch.exists }- // `velocity: .slow`, for the reason `chooseWorksOption` records: a- // default swipe moves this menu by two of its pages and a row can- // fall between two looks, never to be seen again.- app.swipeUp(velocity: .slow)- }- XCTFail("The menu offers a row labelled \(label)", file: file, line: line)- }-- /// `nextTo` names a uniquely labelled row of the same picker, for a label- /// no accessibility qualification distinguishes; the menu's rows carry no- /// identifiers (`worksOptionRow`). T-2353 qualified the "Any" row every- /// filter picker draws, so this file no longer needs it.- private func chooseOption(- _ identifier: String, labelled label: String,- nextTo neighbour: WorksOptionNeighbour? = nil,- file: StaticString = #filePath, line: UInt = #line- ) {- chooseWorksOption(- identifier, labelled: label, nextTo: neighbour, in: app, file: file, line: line)- }-- // MARK: - Req 5.1 — the creator filter-- /// The seventh dimension: a creator, "No creators", the pill each leaves,- /// the creator the options do not offer, and the empty state a combination- /// no work carries explains itself with.- func testTheCreatorFilterNarrowsTheListAndExplainsAnEmptyOne() {- launch()- openWorks()- assertListed(newestOrder, "The list opens on Newest first")-- // Req 5.1: the options are the creators with at least one visible- // credited work — so the creator nothing credits is not among them,- // while "No creators" is offered whether or not anything is.- openOptionsMenu()- waitFor(- app.buttons.matching(NSPredicate(format: "label == %@", "Mori Ayane")).firstMatch,- "Req 5.1: a credited creator is offered")- XCTAssertFalse(- app.buttons.matching(- NSPredicate(format: "label == %@", "Quill Wright")).firstMatch.exists,- "Req 5.1: a creator no visible work credits is not offered")- chooseOpenMenuRow(labelled: "Mori Ayane")-- assertListed(- ["Salt and Ember", "Nightjar Bay", "Lantern Song"],- "Req 5.1: a creator filter keeps that creator's works, in the sort the list is in")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works, filters active",- "…and the menu icon fills as it does for the other six dimensions")-- // Req 5.1: the pill is the reader reading back the row they picked.- waitFor(- app.descendants(matching: .any).matching(- NSPredicate(- format: "identifier == %@ AND label == %@", "works-filter-pills", "Mori Ayane")- ).firstMatch,- "Req 5.1: the active creator is on a pill")-- // Req 5.1: not faceted, so a creator and a site none of their works is- // on is reachable — and the empty state names both.- app.anyElement("works-filter-clear").tap()- assertListed(newestOrder, "Clear returns the whole list")- openOptionsMenu()- chooseOpenMenuRow(labelled: "Studio Lantern")- assertListed(["Lantern Song"], "Req 5.1: the creator credited on one work keeps that one")- chooseOption("works-filter-site-press.test", labelled: "press.test")- waitFor(- app.anyElement("works-filter-empty"),- "A filter that matches nothing names what is narrowing the list")- XCTAssertEqual(workRows.count, 0, "Nothing is listed behind the message")- let explanation = app.staticTexts.matching(- NSPredicate(format: "label BEGINSWITH %@", "No works match")).firstMatch- waitFor(explanation, "The empty state explains itself")- XCTAssertTrue(- explanation.label.contains("Studio Lantern"),- "Req 5.1: the creator is named in the sentence — was \(explanation.label)")- XCTAssertFalse(- app.anyElement("works-search-empty").exists,- "…under the filter empty state, not the search one")-- // Req 5.1's other value: "No creators" holds the works no creator this- // device can name is credited on.- app.anyElement("works-filter-clear").tap()- assertListed(newestOrder, "Clear returns the whole list")- chooseOption("works-filter-creator-none", labelled: "No creators")- assertListed(- ["Quiet Tide"], "Req 5.1: No creators holds the work nothing credits")- waitFor(- app.descendants(matching: .any).matching(- NSPredicate(- format: "identifier == %@ AND label == %@", "works-filter-pills",- "No creators")- ).firstMatch,- "…under its own pill")-- // Req 5.2: nothing about the rows changed — the list the filter narrows- // is the one that was there.- // T-2353: the Creator picker's own "Any" reads "Any creator" — every- // other picker draws its own qualified "Any" too.- chooseOption("works-filter-creator-any", labelled: "Any creator")- assertListed(newestOrder, "Req 5.1: Any returns the whole list")+ }, object: nil)+ XCTAssertEqual(XCTWaiter().wait(for: [expectation], timeout: 15), .completed)+ }+ func testCreatorTokensReplaceAndExplainEmptyResults() {+ openAllWorks(in: app)+ chooseWorksToken("creator", labelled: "Mori Ayane", in: app)+ assertTitles(["Salt and Ember", "Nightjar Bay", "Lantern Song"])+ chooseWorksToken("creator", labelled: "Studio Lantern", in: app)+ assertTitles(["Lantern Song"])+ chooseWorksToken("site", labelled: "press.test", in: app)+ waitFor(app.anyElement("works-filter-empty"), "The incompatible site explains the empty list")+ app.buttons["works-filter-clear"].tap()+ chooseWorksToken("creator", labelled: "No creators", in: app)+ assertTitles(["Quiet Tide"]) } }
diff --git a/Asterism/AsterismUITests/WorksListOptionsUITests.swift b/Asterism/AsterismUITests/WorksListOptionsUITests.swiftindex 01e64a8c..57b046e5 100644--- a/Asterism/AsterismUITests/WorksListOptionsUITests.swift+++ b/Asterism/AsterismUITests/WorksListOptionsUITests.swift@@ -1,91 +1,16 @@ import XCTest -/// The Works list's sort and filter controls (`works-list-options`), driven-/// from app launch.-///-/// The ordering and the narrowing are pure value types with their own unit-/// tests (`WorksListOptionsTests`); what only a journey can prove is that the-/// toolbar menu is reachable, that choosing a row reorders or narrows the list-/// the reader is looking at, that the pills and the filled icon say a filter is-/// on, and that a filter matching nothing explains itself rather than showing a-/// blank list.-///-/// `seeded-works-options` is the fixture with something to sort: **Marrow-/// Lane** (alpha.test, tagged `mystery`, untyped, reading `abandoned` with a-/// verdict), **Ashfall** (beta.test, wearing the removed `webtoon` type, work-/// status `hiatus`) and **Zephyr Court** (alpha.test, `novel`, finished on both-/// sides with a verdict) captured in that order — so the date order is the-/// reverse of it and disagrees with the alphabet at every position — plus the-/// entry-less **Quill Harbour** (beta.test, both statuses on their defaults),-/// the entry-less **Vesper Tide** (alpha.test, reading `toRead`) and one-/// unattached entry.-///-/// `to-read` rides on the same scenario (Q21, Q24): Vesper Tide is the work-/// carrying the fifth reading status, and being entry-less it is also Req 1.5's-/// claim that a to-read row is placed exactly as any other work without entries-/// — inside the no-notes run under the date sorts, and among everything else-/// under the title ones. It is seeded last, so under Newest first it precedes-/// Quill Harbour in that run.-///-/// `work-and-reading-status` rides on that one scenario rather than a second-/// fixture, which is why the four order constants below sink Marrow Lane: Req-/// 5.3's abandoned-last partition applies to every sort. `update-schedule`-/// rides on it too: Marrow Lane carries Monday and Thursday and Ashfall carries-/// Saturday, while Zephyr Court and Quill Harbour carry none, so the release--/// days dimension has both answers in the one library.+/// The library hub, destination sorts, and native search tokens. final class WorksListOptionsUITests: XCTestCase { let app = XCUIApplication()-- /// The four sorts over the fixture, in menu order. Every list is different- /// from every other one, so an assertion here cannot pass against the wrong- /// sort — and the empty work moves out of its own trailing section under- /// the title sorts (Req 2).- ///- /// **Marrow Lane is last of its section in all four**- /// (`work-and-reading-status` Req 5.3, Q31): the partition runs after the- /// ordering and before the view splits the sections, and both steps are- /// stable, so the abandoned work sinks inside the section it was already in- /// while everything else keeps the sort's own order. Under Newest first it- /// was already there, which is why only three of the four constants moved.- ///- /// **Vesper Tide is the second entry-less work** (`to-read` Q24): under the- /// date sorts the two of them are the trailing no-notes run, ordered by- /// `modifiedAt` — Vesper Tide was seeded last, so Newest first puts it- /// before Quill Harbour and Oldest first after it. Under the title sorts- /// they join the one section and the alphabet decides.- private let newestOrder = [- "Zephyr Court", "Ashfall", "Marrow Lane", "Vesper Tide", "Quill Harbour",- ]- private let oldestOrder = [- "Ashfall", "Zephyr Court", "Marrow Lane", "Quill Harbour", "Vesper Tide",- ]- private let aToZOrder = [- "Ashfall", "Quill Harbour", "Vesper Tide", "Zephyr Court", "Marrow Lane",- ]- private let zToAOrder = [- "Zephyr Court", "Vesper Tide", "Quill Harbour", "Ashfall", "Marrow Lane",- ]-- /// The alpha.test site filter, under the opening Newest first sort: two- /// works with notes and Vesper Tide in the trailing no-notes run.- private let alphaSiteOrder = ["Zephyr Court", "Marrow Lane", "Vesper Tide"]-+ private let newestOrder = ["Zephyr Court", "Ashfall", "Vesper Tide", "Quill Harbour", "Marrow Lane"] override func setUp() { continueAfterFailure = false XCUIDevice.shared.orientation = .portrait terminateAndWaitForExit(app) }+ override func tearDown() { terminateAndWaitForExit(app) } - override func tearDown() {- terminateAndWaitForExit(app)- }-- // MARK: - Driving-- /// `textSize` is a `UIContentSizeCategory` name — the- /// `UICTContentSizeCategoryAccessibility{M,L,XL,XXL,XXXL}` spelling, since- /// an unrecognised name is not an error and silently launches at the default- /// size (`WideLayoutAccessibilityUITests` measured that). private func launch(textSize: String? = nil) { app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-works-options" app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString@@ -99,14 +24,6 @@ final class WorksListOptionsUITests: XCTestCase { app.elements(withIdentifierPrefix: "work-row-") } - /// The toolbar control, as a button rather than `anyElement`: Req 6's- /// filled-icon state is asserted through this element's accessibility- /// label, and a wrapper element carrying the same identifier would answer- /// with something else.- private var optionsMenu: XCUIElement {- app.buttons["works-list-options-menu"]- }- /// The work titles the list is showing, in the order it is showing them. /// /// Read off the rows' accessibility labels rather than a title identifier:@@ -139,412 +56,75 @@ final class WorksListOptionsUITests: XCTestCase { } } - /// Opens the menu and chooses one row. `chooseWorksOption` is shared with- /// the accessibility journey (`UIJourneySupport`) and carries the- /// identifier-or-label resolution and the scrolling a tall menu needs.- ///- /// `nextTo` names a uniquely labelled row of the same picker, for a label- /// no accessibility qualification distinguishes; T-2353 qualified the two- /// that used to need it — `Any`, which every picker draws, and `Finished`,- /// which both status vocabularies have — so no call site in this file- /// passes it any more, and it stays available for a future collision.- private func chooseOption(- _ identifier: String, labelled label: String,- nextTo neighbour: WorksOptionNeighbour? = nil,- file: StaticString = #filePath, line: UInt = #line- ) {- chooseWorksOption(- identifier, labelled: label, nextTo: neighbour, in: app, file: file, line: line)- }-- // MARK: - The journey-- /// Every sort, a filter, the pills, the hidden unattached group, Clear and- /// both empty states, in one walk over one launch.- ///- /// One journey rather than six, because each of these is a state the one- /// before it left the screen in: the filter is chosen on a list the sorts- /// have been reordering, Clear is asserted against the empty state it is- /// drawn in, and the query-only miss has to be the miss of a list with no- /// filter left on it.- func testTheOptionsMenuSortsFiltersAndExplainsAnEmptyList() {+ func testHubDestinationsAndBackNavigation() { launch()- waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60) selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")- waitFor(app.staticTexts["unattached-section-header"], "Unattached notes start visible")-- // Req 3: the list opens on Newest first. That it does so on a device- // whose stored sort a previous launch changed is Q8's promise, proven- // by `testASeededLaunchDiscardsTheStoredSort` below.- waitFor(optionsMenu, "The Works toolbar offers the sort and filter menu")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works",- "Req 6: nothing is filtered yet, so the control does not claim to be")- assertListed(newestOrder, "The list opens on Newest first")-- // Req 1: each sort, and the empty work leaving its own section for the- // two title sorts (Req 2).- chooseOption("works-sort-oldest", labelled: "Oldest first")- assertListed(oldestOrder, "Oldest first reverses each section")- chooseOption("works-sort-aToZ", labelled: "A to Z")- assertListed(aToZOrder, "A to Z draws one alphabetical section")- chooseOption("works-sort-zToA", labelled: "Z to A")- assertListed(zToAOrder, "Z to A is that alphabet reversed")- // `work-and-reading-status` Req 5.3: whichever of the four is on, the- // abandoned work is the last of the works that have notes.- XCTAssertEqual(- listedTitles().last, "Marrow Lane",- "The abandoned work sinks under every sort")- chooseOption("works-sort-newest", labelled: "Newest first")- assertListed(newestOrder, "…and the reader can put it back")-- // Req 5: one site, which is three of the five works.- chooseOption("works-filter-site-alpha.test", labelled: "alpha.test")- assertListed(alphaSiteOrder, "A site filter keeps that site's works")- waitFor(app.anyElement("works-filter-pills"), "Req 7: the active filter is on a pill")- waitFor(app.anyElement("works-filter-clear"), "…beside the control that removes it")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works, filters active",- "Req 6: the icon fills while a filter is active, and the label says so")- // Req 7 / Q9: unattached entries carry no type, tag or membership, so no- // filter can describe them and the group goes rather than emptying.- waitUntilGone(- app.staticTexts["unattached-section-header"],- "An active filter hides the unattached group")-- // Req 8 / Q12: the options are not faceted, so a reader can reach a- // combination no work carries — the removed type is on the other site.- chooseOption("works-filter-type-webtoon", labelled: "webtoon")- waitFor(- app.anyElement("works-filter-empty"),- "A filter that matches nothing names what is narrowing the list")- XCTAssertEqual(workRows.count, 0, "Nothing is listed behind the message")-- // Req 7 / Q13: Clear removes every filter and nothing else.- app.anyElement("works-filter-clear").tap()- assertListed(newestOrder, "Clear returns the whole list, in the sort it was in")- waitFor(- app.staticTexts["unattached-section-header"],- "…and the unattached group with it")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works",- "…and the control stops claiming a filter")-- // Req 8's other half: with no filter left, a query that matches nothing- // still gets the search empty state it always had.- let field = searchField(in: app)- field.tap()- field.typeText("zzqqxx")- waitFor(- app.anyElement("works-search-empty"),- "A query-only miss keeps the existing search empty state")- XCTAssertFalse(- app.anyElement("works-filter-empty").exists,- "…rather than the filter one, which would name filters nobody set")+ waitFor(app.anyElement("works-hub"), "Works opens on its hub", timeout: 60)+ for name in ["catchingUp", "reading", "toRead", "series"] {+ XCTAssertTrue(app.buttons["works-tile-" + name].exists)+ }+ app.buttons["works-tile-toRead"].tap()+ waitFor(app.anyElement("works-group-toRead"), "To read opens")+ assertListed(["Vesper Tide"], "Only the queue's member is listed")+ workRows.firstMatch.tap()+ waitFor(app.anyElement("work-detail-pulse"), "The work opens")+ app.goBack()+ waitFor(app.anyElement("works-group-toRead"), "Back returns to the group")+ app.goBack()+ waitFor(app.anyElement("works-hub"), "Back returns to the hub") } - /// Req 4's seeded-launch clause and Q8: a sort chosen in one launch is on- /// the device for the next, and a seeded launch discards it, so every test- /// starts from Newest first. Two launches in one case, because the first- /// has to leave something behind for the second to discard — the main- /// journey deliberately puts the sort back.- func testASeededLaunchDiscardsTheStoredSort() {+ func testAllWorksSortsAndTokensExplainEmptyResults() { launch()- waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")- assertListed(newestOrder, "The first launch opens on Newest first")- chooseOption("works-sort-zToA", labelled: "Z to A")- assertListed(zToAOrder, "Z to A is stored by the first launch")-- terminateAndWaitForExit(app)+ openAllWorks(in: app)+ assertListed(newestOrder, "All works opens newest first")+ chooseWorksSort("A to Z", in: app)+ assertListed(["Ashfall", "Quill Harbour", "Vesper Tide", "Zephyr Court", "Marrow Lane"], "Alphabetical order preserves abandoned-last")+ chooseWorksToken("site", labelled: "alpha.test", in: app)+ assertListed(["Vesper Tide", "Zephyr Court", "Marrow Lane"], "Site token narrows the list")+ XCTAssertFalse(app.staticTexts["unattached-section-header"].exists)+ chooseWorksToken("type", labelled: "webtoon", in: app)+ waitFor(app.anyElement("works-filter-empty"), "An incompatible token explains the empty list")+ app.buttons["works-filter-clear"].tap()+ waitFor(app.staticTexts["unattached-section-header"], "Clear restores unattached notes")+ let search = searchField(in: app)+ search.tap(); search.typeText("zzqqxx")+ waitFor(app.anyElement("works-search-empty"), "A query-only miss has its own state")+ }++ func testEmptySearchOffersAnotherDimensionAfterAToken() { launch()- waitFor(app.collectionViews["recent-list"], "The library opens again", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library again")- assertListed(newestOrder, "A seeded launch discards the stored sort (Q8)")+ openAllWorks(in: app)+ chooseWorksToken("site", labelled: "alpha.test", in: app)+ searchField(in: app).tap()+ waitFor(app.buttons["Type"], "An empty search still offers dimensions after a token")+ app.buttons["Type"].tap()+ waitFor(app.buttons["webtoon"], "Picking the dimension offers values")+ app.buttons["webtoon"].tap()+ waitFor(app.anyElement("works-filter-empty"), "The second token combines with the first") } - /// Req 9's lifetime, and the two paths are now the *only* paths: a filter- /// survives a tab switch and a push to a work and back, because it is- /// `@State` on a view those two leave in place.- ///- /// There used to be a third — the Recent truncation footer's route,- /// clearing the filters through `worksResetToken` — left uncovered because- /// it needed a library over Recent's window cap and this fixture has none.- /// **Neither the footer nor the token exists any more**: `update-schedule`- /// Q24 and Q33 deleted the row cap outright, and `showWorksRoot()` and- /// `worksResetToken` went with it (see the note where they used to be, in- /// `AppNavigation.swift`). So there is nothing left to follow up: a future- /// route out of Today that means "the Works list, query and all" brings its- /// own coverage with it.- func testAFilterSurvivesATabSwitchAndAPush() {+ func testReplacementTokenAndFilterLifetime() { launch()- waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")-- chooseOption("works-filter-site-alpha.test", labelled: "alpha.test")- assertListed(alphaSiteOrder, "A site filter narrows the list")-+ openAllWorks(in: app)+ chooseWorksToken("releases", labelled: "Has release days", in: app)+ assertListed(["Ashfall", "Marrow Lane"], "Release presence ignores reading status")+ chooseWorksToken("releases", labelled: "No release days", in: app)+ assertListed(["Zephyr Court", "Vesper Tide", "Quill Harbour"], "A new token replaces its dimension") selectTab(.today, in: app)- waitFor(app.collectionViews["recent-list"], "Recent is on screen") selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works is back")- assertListed(alphaSiteOrder, "The filter survives a tab switch")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works, filters active",- "…and the control still says so")-+ assertListed(["Zephyr Court", "Vesper Tide", "Quill Harbour"], "Tokens survive tab switches") workRows.firstMatch.tap()- waitFor(app.anyElement("work-detail-pulse"), "The work opens", timeout: 20)- app.navigationBars.buttons.element(boundBy: 0).tap()- waitFor(app.collectionViews["works-list"], "The list is back")- assertListed(alphaSiteOrder, "The filter survives a push and back")- }-- /// The seeder itself, asserted from a launch rather than from a unit test- /// (docs/agent-notes/testing.md): a fixture that throws at launch otherwise- /// shows up only as a `waitForExistence` timeout in whichever journey ran- /// first.- func testWorksOptionsScenarioReachesRecent() {- launch()- waitFor(app.collectionViews["recent-list"], "The seeded library opens", timeout: 60)- XCTAssertEqual(- app.elements(withIdentifierPrefix: "recent-entry-").count, 4,- "Three attached chapters and the unattached note")- }-- // MARK: - `work-and-reading-status`: the statuses on the list (Reqs 5, 6)-- /// Req 5.3's other two clauses — the partition holds **with a query** and- /// **with a filter** — and Req 5.2/5.5's abandoned row saying so in words.- ///- /// Both narrowings are asserted under A to Z rather than Newest first,- /// because that is where the partition is visible: under the date sorts- /// Marrow Lane is the oldest capture and would trail the list anyway, so a- /// missing partition would pass. Under the alphabet it sits second, and only- /// Req 5.3 moves it.- func testTheAbandonedWorkSinksUnderAQueryAndAFilterAndSaysSo() {- launch()- waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")-- // Req 5.5: the knock-down is colour and opacity, which XCUI cannot read- // and a reader may not have. The words are the assertable channel, and- // the requirement is that they are there.- let abandoned = row(titled: "Marrow Lane")- waitFor(abandoned, "The abandoned work is listed")- XCTAssertTrue(- abandoned.label.hasSuffix(". Reading: Abandoned"),- "Req 5.5: the row says it is abandoned — was \(abandoned.label)")- let marked = row(titled: "Zephyr Court")- XCTAssertTrue(- marked.label.hasSuffix(". Work: Finished. Reading: Finished"),- "…and a row wearing both marks names both — was \(marked.label)")- XCTAssertEqual(- row(titled: "Quill Harbour").label, "Open Work Quill Harbour from beta.test",- "A work on both defaults reads exactly as it did before the statuses existed")-- chooseOption("works-sort-aToZ", labelled: "A to Z")- assertListed(aToZOrder, "A to Z sinks the abandoned work to the end")-- // With a filter: alpha.test is Marrow Lane, Vesper Tide and Zephyr- // Court, which the alphabet on its own would put Marrow Lane first of.- // A to Z draws one section, so the entry-less Vesper Tide sits in the- // alphabet rather than behind it (Req 2).- chooseOption("works-filter-site-alpha.test", labelled: "alpha.test")- assertListed(- ["Vesper Tide", "Zephyr Court", "Marrow Lane"],- "Req 5.3: the partition holds with a filter on top of the sort")- app.anyElement("works-filter-clear").tap()- assertListed(aToZOrder, "The filter is cleared before the query goes on")-- // And with a query: the title search keeps three of the five — Zephyr- // Court and Vesper Tide have no `a` — and the abandoned one is still- // last of them. Typed last, so the field never has to be cleared again.- let field = searchField(in: app)- field.tap()- field.typeText("a")- assertListed(- ["Ashfall", "Quill Harbour", "Marrow Lane"],- "Req 5.3: the partition holds with a query on top of the sort")+ waitFor(app.anyElement("work-detail-pulse"), "The work opens")+ app.goBack()+ assertListed(["Zephyr Court", "Vesper Tide", "Quill Harbour"], "Tokens survive pushes") } - /// Req 6.1's two new dimensions, Req 6.2's qualified pill and empty state,- /// and Req 6.3's value that no work carries — one walk, for the reason the- /// main journey is one walk.- func testTheStatusFiltersNarrowTheListAndNameTheirDimension() {- launch()- waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")-- // Work status: the fixture's one work on hiatus. T-2353: every row of- // this picker shows its qualified spelling ("Work: On hiatus"), the- // same text its pill wears — only a row's visible text reaches- // VoiceOver or XCUI on this menu (`WorksView.filterPicker`).- chooseOption("works-filter-work-status-hiatus", labelled: "Work: On hiatus")- assertListed(["Ashfall"], "A work-status filter keeps the works carrying it")- waitFor(pill("Work: On hiatus"), "Req 6.2: the pill names the dimension it filtered")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works, filters active",- "…and the menu icon fills as it does for the other three dimensions")-- // Reading status, on its own: Clear first, so the two are not ANDed into- // a miss neither dimension is responsible for.- app.anyElement("works-filter-clear").tap()- assertListed(newestOrder, "Clear removes the status filter as it does any other")-- chooseOption("works-filter-reading-status-abandoned", labelled: "Reading: Abandoned")- assertListed(["Marrow Lane"], "A reading-status filter keeps the works carrying it")- waitFor(pill("Reading: Abandoned"), "…under its own qualified pill")-- // Req 6.3: the two dimensions are not faceted and their vocabularies are- // closed, so a pair no work carries is reachable — and the empty state- // names both dimensions rather than reading "Finished, Abandoned".- // "Finished" is also the reading side's name for a value (Q23), which- // is exactly why every row of both pickers wears its qualifier.- chooseOption("works-filter-work-status-finished", labelled: "Work: Finished")- waitFor(- app.anyElement("works-filter-empty"),- "A combination no work carries is reachable and explains itself")- let explanation = app.staticTexts.matching(- NSPredicate(format: "label BEGINSWITH %@", "No works match")).firstMatch- waitFor(explanation, "The empty state names what is narrowing the list")- XCTAssertTrue(- explanation.label.contains("Work: Finished")- && explanation.label.contains("Reading: Abandoned"),- "Req 6.2: both dimensions are named — was \(explanation.label)")-- // Q23's whole reason: both vocabularies have a value called "Finished",- // and with the pair the fixture does carry, both pills are on screen at- // once and have to be tellable apart. T-2353 qualifies this row's own- // visible text the same way, "Reading: Finished".- chooseOption("works-filter-reading-status-finished", labelled: "Reading: Finished")- assertListed(["Zephyr Court"], "The pair one work does carry lists it")- waitFor(pill("Work: Finished"), "The work side's Finished names itself")- waitFor(pill("Reading: Finished"), "…and the reading side's names itself too")-- // `to-read` Req 1.1: the fifth value is a filter row like the other- // four, and the fixture's one to-read work answers to it. Clear first,- // so the work-status Finished above is not ANDed into a miss.- app.anyElement("works-filter-clear").tap()- assertListed(newestOrder, "Clear removes both filters before the fifth value goes on")- chooseOption("works-filter-reading-status-toRead", labelled: "Reading: To read")- assertListed(["Vesper Tide"], "Req 1.1: the to-read filter keeps the to-read work")- waitFor(pill("Reading: To read"), "Req 1.1: under the qualified pill the value spells")- XCTAssertTrue(- row(titled: "Vesper Tide").label.hasSuffix(". Reading: To read"),- "Req 1.1: and the row itself names the value — was "- + "\(row(titled: "Vesper Tide").label)")- }-- // MARK: - `update-schedule`: the release-days dimension (Reqs 11.1, 11.3)-- /// Req 11.1's ninth dimension over the same fixture: **Marrow Lane** carries- /// Monday and Thursday and **Ashfall** carries Saturday, while **Zephyr- /// Court**, **Quill Harbour** and **Vesper Tide** carry none.- ///- /// Req 11.2's point is the pair the fixture was given: neither work with- /// days is a *scheduled* work — Marrow Lane is abandoned and Ashfall is on- /// hiatus — so a dimension that let the statuses in would answer `Has- /// release days` with an empty list. The filter asks what the work carries,- /// not what Today would list.- ///- /// One walk, for the reason the main journey is one walk: each state here is- /// the one the step before it left on screen.- func testTheReleaseDaysFilterNarrowsTheListByPresenceAndNamesItself() {- launch()- waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")- assertListed(newestOrder, "The list opens unfiltered")-- // Req 11.2: the works carrying days, whatever their statuses say.- chooseOption("works-filter-release-days-some", labelled: "Has release days")- assertListed(- ["Ashfall", "Marrow Lane"],- "Req 11.2: Has release days keeps the works carrying days, statuses and all")- waitFor(pill("Has release days"), "Req 11.3: the pill reads the row's own name")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works, filters active",- "Req 11.3: the icon fills as it does for the other eight dimensions")- waitUntilGone(- app.staticTexts["unattached-section-header"],- "Req 11.3: an active filter hides the unattached group, this one too")-- // The complement, and the one row task 27 names: the work with no notes- // and no schedule answers to it.- chooseOption("works-filter-release-days-none", labelled: "No release days")- assertListed(- ["Zephyr Court", "Vesper Tide", "Quill Harbour"],- "Req 11.2: No release days keeps the rest, Quill Harbour among them")- waitFor(pill("No release days"), "…under its own pill")- XCTAssertFalse(- pill("Has release days").exists,- "Req 11.1: one value per dimension, so the complement's pill goes")-- // Req 11.3: ANDed with another dimension like any other, reachable as a- // combination no work carries — Marrow Lane is the abandoned work and it- // is the one with days. T-2353: the row's own text is qualified.- chooseOption("works-filter-reading-status-abandoned", labelled: "Reading: Abandoned")- waitFor(- app.anyElement("works-filter-empty"),- "A combination no work carries is reachable and explains itself")- XCTAssertEqual(workRows.count, 0, "Nothing is listed behind the message")- let explanation = app.staticTexts.matching(- NSPredicate(format: "label BEGINSWITH %@", "No works match")).firstMatch- waitFor(explanation, "The empty state names what is narrowing the list")- XCTAssertTrue(- explanation.label.contains("No release days")- && explanation.label.contains("Reading: Abandoned"),- "Req 11.3: the empty state names this dimension in the words its pill uses "- + "— was \(explanation.label)")-- // Req 11.3: Clear removes it as it does any other filter.- app.anyElement("works-filter-clear").tap()- assertListed(newestOrder, "Clear returns the whole list, in the sort it was in")- waitFor(- app.staticTexts["unattached-section-header"], "…and the unattached group with it")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works",- "…and the control stops claiming a filter")-- // Req 11.1: `Any` is the default and the way back to it, which is not- // the same control as Clear — it drops this dimension and leaves the- // others alone.- chooseOption("works-filter-release-days-some", labelled: "Has release days")- assertListed(["Ashfall", "Marrow Lane"], "The dimension is on again")- // T-2353: every picker draws an "Any" row, so the app qualifies each- // one's visible text by dimension (`WorksView.filterPicker`) —- // this picker's is "Any release days", not the bare "Any" every other- // picker also offers.- chooseOption("works-filter-release-days-any", labelled: "Any release days")- assertListed(newestOrder, "Req 11.1: Any returns the whole list")- XCTAssertFalse(- pill("Has release days").exists, "…with the pill gone")- }-- /// Req 5.1, the one thing a unit test cannot see (Q61): **where** the glyphs- /// are drawn and what they cost the row.- ///- /// Zephyr Court wears both marks beside a type tag; Quill Harbour wears- /// neither and is the row the height is measured against. Frames are read- /// after the list has settled on the opening sort, so both rows are laid out- /// in the same pass.- ///- /// The "where" is a default-size fact and stays here; the height comparison- /// is made twice, because at the default size it cannot fail — see- /// `assertGlyphsCostNoHeightAtLargestDynamicType`, which relaunches at- /// `accessibility5` and repeats it there. func testTheRowGlyphsFollowTheTypeTagAndCostTheRowNoHeight() throws { launch() waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library") assertListed(newestOrder, "The list has settled before any frame is read") let marked = waitFor(row(titled: "Zephyr Court"), "The doubly marked row is listed")@@ -604,9 +184,9 @@ final class WorksListOptionsUITests: XCTestCase { waitFor( app.collectionViews["recent-list"], "The library opens at largest Dynamic Type", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library again")- chooseOption("works-sort-aToZ", labelled: "A to Z")+ openAllWorks(in: app)+ waitFor(app.anyElement("works-group-allWorks"), "Works lists the seeded library again")+ chooseWorksSort("A to Z", in: app) let marked = row(titled: "Zephyr Court") scrollUntilPresent(@@ -631,16 +211,6 @@ final class WorksListOptionsUITests: XCTestCase { .firstMatch } - /// One active-filter pill, by the words on it. Every pill carries the same- /// identifier — one per value, which is what the row is — so the label is- /// what tells two of them apart.- private func pill(_ text: String) -> XCUIElement {- app.descendants(matching: .any).matching(- NSPredicate(- format: "identifier == %@ AND label == %@", "works-filter-pills", text)- ).firstMatch- }- /// An element inside a given row, found by frame containment. /// /// A row's children all share their identifiers with the other rows'
diff --git a/Asterism/AsterismUITests/WorksLoadGateUITests.swift b/Asterism/AsterismUITests/WorksLoadGateUITests.swiftindex 7ec066d4..d8ecf1ef 100644--- a/Asterism/AsterismUITests/WorksLoadGateUITests.swift+++ b/Asterism/AsterismUITests/WorksLoadGateUITests.swift@@ -43,7 +43,7 @@ final class WorksLoadGateUITests: XCTestCase { waitFor(app.anyElement("works-load-failed"), "Works says the works could not be loaded") // Req 3.3: not an empty library, and not a list at all. XCTAssertFalse(- app.collectionViews["works-list"].exists,+ app.anyElement("works-hub").exists, "The works list must not be built behind the gate") selectTab(.stats, in: app)@@ -58,7 +58,7 @@ final class WorksLoadGateUITests: XCTestCase { let retry = waitFor(app.buttons["works-load-retry"], "The gate offers a Retry") retry.tap() waitFor(- app.collectionViews["works-list"], "Retry brings up the works list", timeout: 60)+ app.anyElement("works-hub"), "Retry brings up the works list", timeout: 60) waitUntilGone(app.anyElement("works-load-failed"), "…and takes the error with it") // Req 3.4: the other gated tab needs no action of its own — one
diff --git a/Asterism/AsterismUITests/WorksSeriesOptionsUITests.swift b/Asterism/AsterismUITests/WorksSeriesOptionsUITests.swiftindex 767ec7b3..b3256492 100644--- a/Asterism/AsterismUITests/WorksSeriesOptionsUITests.swift+++ b/Asterism/AsterismUITests/WorksSeriesOptionsUITests.swift@@ -1,258 +1,44 @@ import XCTest -/// The Works list's series dimension and its group-by-series toggle-/// (`series-and-related-works` Reqs 4.1–4.4), driven from app launch.-///-/// The filter, the sections and the row text are `WorksListOptions`' and have-/// their own unit tests (`WorksListOptionsTests`). What only a journey can prove-/// is that the sixth picker is reachable in the menu the other five live in,-/// that its pill wears the qualified label the menu row set, that the toggle-/// redraws the list into sections a reader can tap through to a series, and that-/// the row's series line goes when the header already says it.-///-/// `seeded-series` is the fixture and `seeded-works-options` is deliberately left-/// alone: that scenario's suites assert exact orders that a sixth work or a-/// series would move. final class WorksSeriesOptionsUITests: XCTestCase { let app = XCUIApplication()-- /// The whole list under the opening sort. Newest first, with Req 5.3's- /// abandoned-last partition sinking Cold Harbour — the fixture's works were- /// captured in the reverse of this order.- private let newestOrder = [- "Lantern Papers", "Ashfall on Stage", "Ashfall Falling", "Ashfall Rising", "Cold Harbour",- ]- override func setUp() { continueAfterFailure = false XCUIDevice.shared.orientation = .portrait terminateAndWaitForExit(app)- }-- override func tearDown() {- terminateAndWaitForExit(app)- }-- // MARK: - Driving-- private func launch() { app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-series" app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString app.launch() }-- private func openWorks() {- waitFor(app.collectionViews["recent-list"], "The library opens", timeout: 60)- selectTab(.works, in: app)- waitFor(app.collectionViews["works-list"], "Works lists the seeded library")- }-- private var workRows: XCUIElementQuery {- app.elements(withIdentifierPrefix: "work-row-")- }-- private var optionsMenu: XCUIElement {- app.buttons["works-list-options-menu"]- }-- /// The work titles the list is showing, in the order it is showing them —- /// read off `WorksRowPresentation.openLabel`, the one label naming exactly- /// the work each row opens.- private func listedTitles() -> [String] {- let rows = workRows- return (0..<rows.count).compactMap { index in- let label = rows.element(boundBy: index).label- guard let opened = label.range(of: "Open Work "), opened.lowerBound == label.startIndex,- let site = label.range(of: " from ")- else { return nil }- return String(label[opened.upperBound..<site.lowerBound])- }- }-- private func assertListed(- _ expected: [String], _ message: String,- file: StaticString = #filePath, line: UInt = #line- ) {- let settled = XCTNSPredicateExpectation(- predicate: NSPredicate { _, _ in self.listedTitles() == expected }, object: nil)- guard XCTWaiter().wait(for: [settled], timeout: 15) == .completed else {- XCTFail("\(message) — was \(listedTitles())", file: file, line: line)- return- }- }-- /// Opens the options menu and chooses the row whose label starts with- /// `prefix`.- ///- /// `chooseWorksOption` cannot serve here: a series row's identifier carries- /// the series' uuid and its label carries Req 1.3's qualifier — the creation- /// date and an ordinal assigned by identifier order — so neither is knowable- /// from a test. Only one series in this fixture has a visible member, so the- /// name is enough to name its row. The query is restricted to buttons, which- /// the menu's rows are and the filter pills are not.- private func chooseOption(- startingWith prefix: String,- file: StaticString = #filePath, line: UInt = #line- ) {- scrollUntilTappableAndTap(- optionsMenu, in: app, "The Works toolbar offers the sort and filter menu",- file: file, line: line)- let row = app.buttons.matching(NSPredicate(format: "label BEGINSWITH %@", prefix))- _ = row.firstMatch.waitForExistence(timeout: 5)- for _ in 0..<8 {- let candidate = row.firstMatch- if candidate.exists, candidate.isHittable {- candidate.tap()- waitUntilGone(- candidate, "Choosing \(prefix) closes the menu", timeout: 10,- file: file, line: line)- return+ override func tearDown() { terminateAndWaitForExit(app) }+ private func assertTitles(_ titles: [String]) {+ let query = app.elements(withIdentifierPrefix: "work-row-")+ let expectation = XCTNSPredicateExpectation(predicate: NSPredicate { _, _ in+ query.count == titles.count && titles.allSatisfy { title in+ query.matching(NSPredicate(format: "label BEGINSWITH %@", "Open Work " + title + " ")).firstMatch.exists }- // `velocity: .slow`, for the reason `chooseWorksOption` records: a- // default swipe moves this menu by two of its pages and a row can- // fall between two looks, never to be seen again.- app.swipeUp(velocity: .slow)- }- XCTFail("The menu offers a row starting with \(prefix)", file: file, line: line)- }-- private func chooseOption(- _ identifier: String, labelled label: String,- file: StaticString = #filePath, line: UInt = #line- ) {- chooseWorksOption(identifier, labelled: label, in: app, file: file, line: line)- }-- private var seriesHeaders: XCUIElementQuery {- app.elements(withIdentifierPrefix: "works-series-header-")- }-- // MARK: - Req 4.2 — the series filter-- /// The sixth dimension: a series, "No series", the pill each leaves, and the- /// empty state a combination no work carries explains itself with.- func testTheSeriesFilterNarrowsTheListAndExplainsAnEmptyOne() {- launch()- openWorks()- assertListed(newestOrder, "The list opens on Newest first")-- // Req 4.2: the series with visible members. Its two works, in the sort- // the list is in rather than in position order — grouping is the other- // requirement, and this one is a filter.- chooseOption(startingWith: "Ashfall Cycle")- assertListed(- ["Ashfall Falling", "Ashfall Rising"], "A series filter keeps that series' works")- XCTAssertEqual(- optionsMenu.label, "Sort and filter works, filters active",- "…and the menu icon fills as it does for the other five dimensions")-- // Req 4.2 and Q26: the pill is the reader reading back the row they- // picked, qualifier and all.- let pill = app.descendants(matching: .any).matching(- NSPredicate(- format: "identifier == %@ AND label BEGINSWITH %@",- "works-filter-pills", "Ashfall Cycle \u{00B7} ")- ).firstMatch- waitFor(pill, "Req 4.2: the active series is on a qualified pill")-- // Req 4.2: not faceted, so a series and a site no member of it is on is- // reachable — and the empty state names both.- chooseOption("works-filter-site-signal.test", labelled: "signal.test")- let empty = waitFor(- app.anyElement("works-filter-empty"),- "A filter that matches nothing names what is narrowing the list")- XCTAssertEqual(workRows.count, 0, "Nothing is listed behind the message")- let explanation = app.staticTexts.matching(- NSPredicate(format: "label BEGINSWITH %@", "No works match")).firstMatch- waitFor(explanation, "The empty state explains itself")- XCTAssertTrue(- explanation.label.contains("Ashfall Cycle \u{00B7} "),- "Req 4.2: the series is named in the sentence — was \(explanation.label)")- XCTAssertTrue(empty.exists, "…under the filter empty state, not the search one")-- // Req 4.2's other value: "No series" holds the works with no membership- // **and** the one whose series has not arrived.- app.anyElement("works-filter-clear").tap()- assertListed(newestOrder, "Clear returns the whole list")- chooseOption("works-filter-series-none", labelled: "No series")- assertListed(- ["Lantern Papers", "Ashfall on Stage", "Cold Harbour"],- "Req 4.2: No series holds the unattached memberships and the unresolved one")- waitFor(- app.descendants(matching: .any).matching(- NSPredicate(- format: "identifier == %@ AND label == %@", "works-filter-pills", "No series")- ).firstMatch,- "…under its own pill")- }-- // MARK: - Req 4.3, 4.4, 4.1 — the group toggle-- /// The toggle: the sections it draws, the header that opens its series, the- /// row line it takes away, and the fact that it is a stored preference a- /// seeded launch discards.- func testTheGroupToggleSectionsTheListAndItsHeaderOpensTheSeries() {- launch()- openWorks()- assertListed(newestOrder, "The list opens ungrouped, on Newest first")-- // Req 4.1: ungrouped, the row says which series it is in and where.- let risingLine = app.staticTexts.matching(- NSPredicate(- format: "identifier == %@ AND label BEGINSWITH %@",- "work-row-series", "Ashfall Cycle \u{00B7} ")- ).firstMatch- waitFor(risingLine, "Req 4.1: an ungrouped row names its series and position")- waitFor(- app.descendants(matching: .any).matching(- NSPredicate(- format: "identifier == %@ AND label == %@",- "work-row-series", "Unavailable series")- ).firstMatch,- "…and an unresolved membership says so rather than reading as unattached")-- chooseOption("works-list-group-by-series", labelled: "Group by series")-- // Req 4.3: one section per series with a visible member, its members in- // position order — which is *not* the sort the rest of the list is in —- // then the No series run under the sort, abandoned last.- assertListed(- ["Ashfall Rising", "Ashfall Falling", "Lantern Papers", "Ashfall on Stage",- "Cold Harbour"],- "Req 4.3: the series section is in position order and the rest keeps the sort")- waitFor(- app.staticTexts["works-no-series-header"],- "…under a header naming the run that is in no series")-- // Req 4.1: the row's series line is what the header already says.- waitUntilGone(risingLine, "Req 4.1: the row's series line goes while the list is grouped")-- // Req 4.4: the header opens its series, with nothing marked — this one- // was opened from the list, not from a work (Req 3.3).- XCTAssertEqual(seriesHeaders.count, 1, "One series has a visible member")- let header = seriesHeaders.firstMatch- XCTAssertTrue(- header.label.hasPrefix("Open series Ashfall Cycle \u{00B7} "),- "Req 1.3: the header wears the qualifier too — was \(header.label)")- header.tap()- waitFor(app.anyElement("series-detail"), "Req 4.4: the header opens its series")- XCTAssertFalse(- app.anyElement("series-member-current").exists,- "Req 3.3: a series opened from the list marks no row")-- app.goBack()- waitFor(app.collectionViews["works-list"], "Back returns to the grouped list")- waitFor(app.staticTexts["works-no-series-header"], "…still grouped")-- // Req 4.3: the toggle is stored with the sort, and a seeded launch- // discards both (Q51's `seededLaunchResets`). Two launches in one case,- // because the first has to leave something for the second to discard.- terminateAndWaitForExit(app)- launch()- openWorks()- assertListed(newestOrder, "Req 4.3: a seeded launch discards the stored toggle")- XCTAssertFalse(- app.staticTexts["works-no-series-header"].exists,- "…so the list is the ungrouped one again")+ }, object: nil)+ XCTAssertEqual(XCTWaiter().wait(for: [expectation], timeout: 15), .completed)+ }+ func testSeriesTokensAndEmptyResults() {+ openAllWorks(in: app)+ chooseWorksToken("series", labelled: "Ashfall Cycle", in: app)+ assertTitles(["Ashfall Falling", "Ashfall Rising"])+ chooseWorksToken("site", labelled: "signal.test", in: app)+ waitFor(app.anyElement("works-filter-empty"), "The incompatible site explains the empty list")+ app.buttons["works-filter-clear"].tap()+ chooseWorksToken("series", labelled: "No series", in: app)+ assertTitles(["Lantern Papers", "Ashfall on Stage", "Cold Harbour"])+ }+ func testSeriesTileOpensProgressIndexAndReadingOrder() {+ selectTab(.works, in: app)+ waitFor(app.buttons["works-tile-series"], "The hub offers Series", timeout: 60).tap()+ waitFor(app.anyElement("series-index"), "Series index opens")+ let card = app.elements(withIdentifierPrefix: "series-card-").matching(+ NSPredicate(format: "label BEGINSWITH %@", "Ashfall Cycle")).firstMatch+ waitFor(card, "The series card is present").tap()+ waitFor(app.anyElement("series-detail"), "The series page opens")+ XCTAssertTrue(app.anyElement("series-detail-progress").exists)+ XCTAssertTrue(app.elements(withIdentifierPrefix: "series-member-").count > 0) } }
diff --git a/Makefile b/Makefileindex 46c452a3..a3468635 100644--- a/Makefile+++ b/Makefile@@ -96,12 +96,14 @@ verify-identity: @scripts/verify-identity.sh .PHONY: test-core+# Optional SwiftPM cache/build flags for restricted build environments.+SWIFT_TEST_FLAGS ?= # Swift package tests are not members of the app scheme's test plan. # `--no-parallel` is load-bearing, not a speed choice: parallel `swift test` # crashes the run with `NSUnknownKeyException: the entity Site is not key value # coding-compliant for the key "entries"` (Q34, docs/agent-notes/testing.md). test-core: verify-identity- $(PIPEFAIL) swift test --package-path Packages/AsterismCore --no-parallel $(if $(CORE_TEST),--filter '$(CORE_TEST)',) $(PIPE_PRETTY)+ $(PIPEFAIL) swift test --package-path Packages/AsterismCore --no-parallel $(SWIFT_TEST_FLAGS) $(if $(CORE_TEST),--filter '$(CORE_TEST)',) $(PIPE_PRETTY) .PHONY: build build-ios build: build-ios
diff --git a/Asterism/Asterism/ViewModels/WorksSearchToken.swift b/Asterism/Asterism/ViewModels/WorksSearchToken.swiftnew file mode 100644index 00000000..043768d9--- /dev/null+++ b/Asterism/Asterism/ViewModels/WorksSearchToken.swift@@ -0,0 +1,102 @@+import AsterismCore+import Foundation++nonisolated struct WorksSearchToken: Identifiable, Equatable, Sendable {+ enum Dimension: String, CaseIterable, Sendable {+ case type, tag, site, series, creator, status, reading, releases+ var title: String { rawValue.capitalized }+ }+ let dimension: Dimension+ let label: String+ let filter: WorksFilter+ var id: String {+ if let value = filter.type {+ switch value {+ case .untyped: return "type:untyped"+ case .named(let name): return "type:named:" + name+ }+ }+ if let value = filter.tag { return WorksFilterPresentation.tagRowIdentifier(value) }+ if let value = filter.hostname { return WorksFilterPresentation.siteRowIdentifier(value) }+ if let value = filter.series { return WorksFilterPresentation.seriesRowIdentifier(value) }+ if let value = filter.creator { return WorksFilterPresentation.creatorRowIdentifier(value) }+ if let value = filter.workStatus { return WorksFilterPresentation.workStatusRowIdentifier(value) }+ if let value = filter.readingStatus { return WorksFilterPresentation.readingStatusRowIdentifier(value) }+ if let value = filter.releaseDays { return WorksFilterPresentation.releaseDaysRowIdentifier(value) }+ return "dimension:" + dimension.rawValue+ }+ var isDimension: Bool { !filter.isActive }++ static func normalized(_ tokens: [Self]) -> [Self] {+ var result: [Self] = []+ for token in tokens where !token.isDimension {+ result.removeAll { $0.dimension == token.dimension }+ result.append(token)+ }+ return result+ }++ static func selection(_ new: [Self], replacing old: [Self], query: String) -> (tokens: [Self], query: String) {+ let nextQuery: String+ if let dimension = new.last, dimension.isDimension {+ nextQuery = dimension.dimension.rawValue + ":"+ } else if new.contains(where: { token in !old.contains(where: { $0.id == token.id }) && !token.isDimension }) {+ nextQuery = ""+ } else {+ nextQuery = query+ }+ return (normalized(new), nextQuery)+ }++ static func filter(from tokens: [Self]) -> WorksFilter {+ var result = WorksFilter()+ for token in normalized(tokens) {+ switch token.dimension {+ case .type: result.type = token.filter.type+ case .tag: result.tag = token.filter.tag+ case .site: result.hostname = token.filter.hostname+ case .series: result.series = token.filter.series+ case .creator: result.creator = token.filter.creator+ case .status: result.workStatus = token.filter.workStatus+ case .reading: result.readingStatus = token.filter.readingStatus+ case .releases: result.releaseDays = token.filter.releaseDays+ }+ }+ return result+ }++ static func values(options: WorksFilterOptions, siteNames: SiteNames) -> [Self] {+ options.types.map { Self(dimension: .type, label: $0.name, filter: WorksFilter(type: $0.selection)) }+ + options.tags.map { Self(dimension: .tag, label: $0, filter: WorksFilter(tag: $0)) }+ + options.hostnames.map { Self(dimension: .site, label: siteNames.label(for: $0), filter: WorksFilter(hostname: $0)) }+ + [Self(dimension: .series, label: WorksFilterOptions.noSeriesLabel, filter: WorksFilter(series: .noSeries))]+ + options.series.map { Self(dimension: .series, label: $0.label, filter: WorksFilter(series: .series($0.id))) }+ + [Self(dimension: .creator, label: WorksFilterOptions.noCreatorsLabel, filter: WorksFilter(creator: .noCreators))]+ + options.creators.map { Self(dimension: .creator, label: $0.label, filter: WorksFilter(creator: .creator($0.id))) }+ + WorkStatus.allCases.map { Self(dimension: .status, label: WorkStatusPresentation.accessibilityLabel($0), filter: WorksFilter(workStatus: $0)) }+ + ReadingStatus.allCases.map { Self(dimension: .reading, label: ReadingStatusPresentation.accessibilityLabel($0), filter: WorksFilter(readingStatus: $0)) }+ + ReleaseDayPresence.allCases.map { Self(dimension: .releases, label: $0.name, filter: WorksFilter(releaseDays: $0)) }+ }++ static func refreshed(_ tokens: [Self], options: WorksFilterOptions, siteNames: SiteNames) -> [Self] {+ tokens.compactMap { token in+ guard token.filter.pruned(to: options).isActive else { return nil }+ return Self(dimension: token.dimension,+ label: WorksFilterPresentation.activeLabels(token.filter, options: options, siteNames: siteNames).joined(),+ filter: token.filter)+ }+ }++ static func suggestions(query: String, values: @autoclosure () -> [Self], group: WorksGroup?) -> [Self] {+ let allowed = Dimension.allCases.filter {+ !($0 == .reading && group != nil) && !($0 == .status && group == .onHiatus)+ }+ let parts = query.split(separator: ":", maxSplits: 1, omittingEmptySubsequences: false)+ if parts.count == 2, let dimension = Dimension(rawValue: parts[0].lowercased()), allowed.contains(dimension) {+ let term = parts[1].trimmingCharacters(in: .whitespaces).lowercased()+ return values().filter { $0.dimension == dimension && (term.isEmpty || $0.label.lowercased().contains(term)) }+ }+ return allowed.filter { query.isEmpty || $0.rawValue.hasPrefix(query.lowercased()) }+ .map { Self(dimension: $0, label: $0.title, filter: WorksFilter()) }+ }+}
diff --git a/Asterism/Asterism/Views/SeriesCoverFan.swift b/Asterism/Asterism/Views/SeriesCoverFan.swiftnew file mode 100644index 00000000..61afb9f6--- /dev/null+++ b/Asterism/Asterism/Views/SeriesCoverFan.swift@@ -0,0 +1,84 @@+import AsterismCore+import ConstellationKit+import SwiftUI++/// Cover slots for the library surfaces, including a decorative initials fallback.+struct WorkThumbnailView: View {+ let work: WorkSnapshot+ let size: CGSize+ @State private var drawn = false++ var body: some View {+ ZStack {+ if work.thumbnail == nil || !drawn {+ RoundedRectangle(cornerRadius: 6)+ .fill(LinearGradient(gradient: SiteGlyphPalette.gradient(forHostname: work.primaryHostname),+ startPoint: .topLeading, endPoint: .bottomTrailing))+ Text(work.displayTitle.split(separator: " ").prefix(2).compactMap(\.first).map(String.init).joined())+ .font(AsterismTypography.serif(.caption2)).foregroundStyle(.white)+ .lineLimit(1).minimumScaleFactor(0.5).padding(3)+ }+ if let identity = work.thumbnail {+ ThumbnailSlot(workID: work.id, identity: identity, baseSize: size,+ cornerRadius: 6, trailingGap: 0, isDrawn: $drawn)+ }+ }+ .frame(width: size.width, height: size.height)+ .accessibilityHidden(true)+ }+}++struct SeriesCoverFan: View {+ /// Front first, selected by SeriesProgress, then its neighbours.+ let covers: [WorkSnapshot]+ let memberCount: Int+ var size: CGFloat = 62++ private var coverSize: CGSize { CGSize(width: size * 0.58, height: size * 0.81) }+ var body: some View {+ ZStack(alignment: .bottomTrailing) {+ ZStack {+ if covers.count == 1 {+ RoundedRectangle(cornerRadius: 5)+ .strokeBorder(AsterismColors.violet.opacity(0.35), style: StrokeStyle(lineWidth: 1.2, dash: [3]))+ .frame(width: coverSize.width, height: coverSize.height)+ .rotationEffect(.degrees(9)).offset(x: size * 0.12, y: 2)+ }+ if covers.count > 2 {+ cover(covers[2]).rotationEffect(.degrees(-9)).opacity(0.75).offset(x: -size * 0.18, y: 3)+ }+ if covers.count > 1 {+ cover(covers[1]).rotationEffect(.degrees(covers.count == 2 ? 8 : 9))+ .opacity(0.85).offset(x: size * 0.18, y: 3)+ }+ if let first = covers.first {+ cover(first).rotationEffect(.degrees(covers.count == 2 ? -4 : 0))+ .shadow(color: .black.opacity(0.3), radius: 4, y: 3)+ }+ }.frame(width: size, height: size)+ if memberCount > 3 {+ Text("+\(memberCount - 3)").font(.caption2.bold()).constellationPill(.genreTag)+ }+ }.frame(width: size, height: size).accessibilityHidden(true)+ }+ private func cover(_ work: WorkSnapshot) -> some View { WorkThumbnailView(work: work, size: coverSize) }+}++struct SeriesProgressSegments: View {+ let members: [WorkSnapshot]+ var height: CGFloat = 4+ var body: some View {+ HStack(spacing: 3) {+ ForEach(members, id: \.id) { work in+ Capsule().fill(color(work.readingStatus)).frame(height: height)+ }+ }.accessibilityLabel("\(members.filter { $0.readingStatus == .finished }.count) of \(members.count) finished")+ }+ private func color(_ status: ReadingStatus) -> Color {+ switch status {+ case .finished: AsterismColors.cyan+ case .reading, .catchingUp: AsterismColors.cyan.opacity(0.45)+ case .toRead, .abandoned: AsterismColors.cardBorder+ }+ }+}
diff --git a/Asterism/Asterism/Views/SeriesIndexView.swift b/Asterism/Asterism/Views/SeriesIndexView.swiftnew file mode 100644index 00000000..4033b268--- /dev/null+++ b/Asterism/Asterism/Views/SeriesIndexView.swift@@ -0,0 +1,169 @@+import AsterismCore+import ConstellationKit+import SwiftUI++/// Progress sections over the existing series directory. The host owns navigation.+struct SeriesIndexView: View {+ @State private var model: SeriesListModel+ /// `AppLibraryModel.snapshotGeneration`. A series or a member arriving+ /// through sync bumps it, and this screen re-reads on the bump (Req 11.2).+ let works: [WorkSnapshot]+ @State private var showingAdd = false+ let snapshotGeneration: Int+ let showsSky: Bool+ let onSelectSeries: (UUID) -> Void++ init(+ model: SeriesListModel,+ snapshotGeneration: Int,+ works: [WorkSnapshot] = [],+ showsSky: Bool,+ onSelectSeries: @escaping (UUID) -> Void+ ) {+ _model = State(initialValue: model)+ self.snapshotGeneration = snapshotGeneration+ self.works = works+ self.showsSky = showsSky+ self.onSelectSeries = onSelectSeries+ }++ var body: some View {+ List {+ Text("\(model.rows.count) series · \(model.rows.reduce(0) { $0 + $1.memberCount }) works")+ .font(.caption).foregroundStyle(AsterismColors.secondaryText).constellationListRow()+ listSection+ }+ // Req 8.1 of `ipad-and-mac-layouts`: the Works tab's sky shows through+ // the pushed screen, and the Mac's alternating rows would stripe it.+ .scrollContentBackground(.hidden)+ .macListChrome()+ .navigationTitle("Series")++ .screenSky(showsSky)+ .accessibilityIdentifier("series-index")+ .toolbar {+ ToolbarItem(placement: .primaryAction) {+ Button("New Series", systemImage: "plus") { showingAdd = true }+ .accessibilityIdentifier("series-new-button")+ }+ }+ .sheet(isPresented: $showingAdd) {+ NavigationStack {+ Form { addSection }.navigationTitle("New Series")+ .toolbar { ToolbarItem(placement: .cancellationAction) { Button("Cancel") { showingAdd = false } } }+ }.frame(minWidth: 300, minHeight: 200)+ }+ .task(id: snapshotGeneration) { await model.reload(for: snapshotGeneration) }+ }++ // MARK: - Adding (Req 1.1)++ /// The work-types screen's shape: a field and the button that commits it, on+ /// one row, so the two are read as the single action they are.+ @ViewBuilder+ private var addSection: some View {+ Section {+ HStack {+ // A series name is data, not prose: the keyboard must not+ // capitalise or correct a name the reader chose deliberately.+ TextField("New series name", text: $model.draftName)+ .autocorrectionDisabled()+ .noAutocapitalization()+ .accessibilityIdentifier("series-list-add-field")+ Button {+ Task { await model.add(); if model.message == nil { showingAdd = false } }+ } label: {+ Text("Add")+ .frame(+ minWidth: AsterismLayout.minHitTarget,+ minHeight: AsterismLayout.minHitTarget+ )+ .contentShape(Rectangle())+ }+ .disabled(!model.canAdd)+ .accessibilityIdentifier("series-list-add-button")+ }+ .frame(minHeight: AsterismLayout.minHitTarget)++ // Req 1.1's refusal, in the one line the screen says back. Worded by+ // the model.+ if let message = model.message {+ Text(message)+ .font(.caption)+ .foregroundStyle(.secondary)+ .accessibilityIdentifier("series-list-message")+ }+ }+ }++ // MARK: - The list (Req 1.6)++ @ViewBuilder+ private var listSection: some View {+ switch model.state {+ case .loading:+ ProgressView("Loading…")+ .accessibilityIdentifier("series-list-loading")+ case .error(let message):+ Text(message)+ .font(.callout)+ .foregroundStyle(.secondary)+ .accessibilityIdentifier("series-list-error")+ case .ready:+ if model.rows.isEmpty {+ Text(model.emptyMessage)+ .font(.callout)+ .foregroundStyle(.secondary)+ .accessibilityIdentifier("series-list-empty")+ } else {+ let progress = progressRows+ ForEach(SeriesProgress.Section.allCases, id: \.rawValue) { section in+ let rows = progress.filter { $0.section == section }+ if !rows.isEmpty {+ Section {+ ForEach(rows, id: \.series.id) { seriesRow($0).constellationListRow() }+ } header: { ConstellationSectionHeader(section.rawValue, accent: .violet) }+ }+ }+ }+ }+ }++ private var progressRows: [SeriesProgress] {+ let members = Dictionary(grouping: works, by: { $0.series?.id })+ return model.rows.map { row in+ SeriesProgress.build(series: row.series.display, members: members[row.id] ?? [])+ }.sorted(by: SeriesProgress.precedes)+ }++ private func seriesRow(_ progress: SeriesProgress) -> some View {+ Button { onSelectSeries(progress.series.id) } label: {+ HStack(spacing: 12) {+ SeriesCoverFan(covers: progress.covers, memberCount: progress.members.count)+ VStack(alignment: .leading, spacing: 7) {+ HStack {+ Text(progress.series.label).font(AsterismTypography.serifRowTitle).lineLimit(1)+ Spacer(minLength: 4)+ Text(Pluralisation.count(progress.members.count, "work", "works"))+ .font(.caption).foregroundStyle(AsterismColors.secondaryText)+ }+ SeriesProgressSegments(members: progress.members)+ Text(nextLine(progress)).font(.caption).lineLimit(1)+ .foregroundStyle(progress.section == .inProgress ? AsterismColors.cyan : AsterismColors.secondaryText)+ }+ Image(systemName: "chevron.right").font(.caption).foregroundStyle(AsterismColors.secondaryText)+ }.padding(12).constellationCard().opacity(progress.section == .completed ? 0.6 : 1)+ }.buttonStyle(.plain)+ .accessibilityIdentifier("series-card-\(progress.series.id.uuidString)")+ .accessibilityLabel("\(progress.series.label), \(progress.members.count) works, \(progress.finishedCount) of \(progress.members.count) finished, next: \(progress.nextUp?.displayTitle ?? "none")")+ }++ private func nextLine(_ progress: SeriesProgress) -> String {+ guard let next = progress.nextUp else {+ return progress.section == .completed ? "Completed" : "No works to start"+ }+ if progress.section == .notStarted { return "Start with " + next.displayTitle }+ let chapter = SeriesProgress.nextChapter(in: next).map { " · Ch \($0)" } ?? ""+ return "Next: " + next.displayTitle + chapter + (WorksRowDetail.releasesToday(next) ? " today" : "")+ }+}
diff --git a/Asterism/Asterism/Views/WorksGroupView.swift b/Asterism/Asterism/Views/WorksGroupView.swiftnew file mode 100644index 00000000..5c928902--- /dev/null+++ b/Asterism/Asterism/Views/WorksGroupView.swift@@ -0,0 +1,173 @@+import AsterismCore+import ConstellationKit+import SwiftUI++struct WorksGroupView: View {+ let library: WorksView+ let group: WorksGroup?+ var onBack: (() -> Void)?++ var body: some View {+ WorksSearchContent(library: library, group: group, isHub: false) { EmptyView() }+ .navigationTitle(group?.title ?? "All works")+ .toolbar {+ if let onBack {+ ToolbarItem(placement: .navigation) {+ Button("Works", systemImage: "chevron.left", action: onBack)+ .accessibilityIdentifier("works-group-back")+ }+ }+ ToolbarItem(placement: .primaryAction) {+ Button { library.onNewWork(group?.initialReadingStatus ?? .toRead) } label: {+ Label("New Work", systemImage: "plus")+ }.accessibilityIdentifier("works-new-work-button")+ }+ }+ }+}++/// Search and row rendering are shared by hub results and every destination.+struct WorksSearchContent<Hub: View>: View {+ let library: WorksView+ let group: WorksGroup?+ let isHub: Bool+ @ViewBuilder let hub: () -> Hub+ @State private var query = ""+ @State private var tokens: [WorksSearchToken] = []+ @AppStorage private var storedSort: String+ @Environment(\.siteNames) private var siteNames++ init(library: WorksView, group: WorksGroup?, isHub: Bool, @ViewBuilder hub: @escaping () -> Hub) {+ self.library = library+ self.group = group+ self.isHub = isHub+ self.hub = hub+ _storedSort = AppStorage(wrappedValue: group == nil ? "newest" : "groupDefault",+ group.map { "worksGroup.sort." + $0.rawValue } ?? WorksListStorageKey.sort)+ }++ private var filter: WorksFilter { WorksSearchToken.filter(from: tokens) }+ private var active: Bool { !query.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || filter.isActive }+ private var members: [WorkSnapshot] { group?.members(of: library.snapshot.works) ?? library.snapshot.works }+ private var values: [WorksSearchToken] { WorksSearchToken.values(options: library.filterOptions, siteNames: siteNames) }+ private var suggestions: [WorksSearchToken] { WorksSearchToken.suggestions(query: query, values: values, group: group) }+ private var rows: [WorkSnapshot] {+ // A dimension prefix is navigation through suggestions, not a title query.+ let searchingDimension = query.contains(":") && !suggestions.isEmpty+ let narrowed = filter.apply(to: WorksSearchFilter(query: searchingDimension ? "" : query).apply(to: members))+ if let group { return group.sorted(narrowed, by: WorksGroupSort(rawValue: storedSort) ?? .groupDefault) }+ return WorksSort(storedValue: storedSort).apply(to: narrowed)+ }+ private var sortPhrase: String {+ guard let group else { return WorksSort(storedValue: storedSort).label.lowercased() }+ return (WorksGroupSort(rawValue: storedSort) ?? .groupDefault).label(group: group).lowercased()+ }++ var body: some View {+ content+ .screenSky(library.showsSky)+ .modifier(WorksTokenSearch(text: $query, tokens: $tokens, suggestions: suggestions,+ prompt: isHub ? "Search \(library.snapshot.works.count) works" : "Search in \(group?.title ?? "All works")",+ focusRequest: library.searchFocusRequest))+ .onChange(of: tokens) { old, new in+ let selection = WorksSearchToken.selection(new, replacing: old, query: query)+ query = selection.query+ if selection.tokens != tokens { tokens = selection.tokens }+ }+ .onChange(of: library.filterOptions) { _, options in+ tokens = WorksSearchToken.refreshed(tokens, options: options, siteNames: siteNames)+ }+ .onChange(of: siteNames) { _, names in+ tokens = WorksSearchToken.refreshed(tokens, options: library.filterOptions, siteNames: names)+ }+ .toolbar {+ if !isHub {+ ToolbarItem(placement: .primaryAction) {+ Menu {+ if let group {+ Picker("Sort", selection: $storedSort) {+ ForEach(WorksGroupSort.allCases, id: \.rawValue) { sort in+ Text(sort.label(group: group)).tag(sort.rawValue)+ }+ }+ } else {+ Picker("Sort", selection: $storedSort) {+ ForEach(WorksSort.allCases) { Text($0.label).tag($0.rawValue) }+ }+ }+ } label: { Label("Sort", systemImage: "arrow.up.arrow.down") }+ .accessibilityIdentifier("works-group-sort-menu")+ }+ }+ }+ }++ @ViewBuilder private var content: some View {+ if ArrivingLibraryPresentation.emptyState(isAwaitingFirstSync: library.isAwaitingFirstSync,+ hasContent: ArrivingLibraryPresentation.hasContent(worksSnapshot: library.snapshot)) == .arriving {+ ContentUnavailableView(ArrivingLibraryPresentation.title,+ systemImage: ArrivingLibraryPresentation.systemImage,+ description: Text(ArrivingLibraryPresentation.message))+ .accessibilityIdentifier("works-empty-first-sync")+ } else if isHub && !active {+ hub()+ } else if rows.isEmpty && filter.isActive {+ ContentUnavailableView {+ Label("No matching works", systemImage: "line.3.horizontal.decrease.circle")+ .accessibilityIdentifier("works-filter-empty")+ } description: {+ Text(WorksFilterPresentation.emptyDescription(labels: tokens.map(\.label), query: query.isEmpty ? nil : query))+ } actions: {+ Button("Clear") { tokens = [] }.accessibilityIdentifier("works-filter-clear")+ }+ } else if rows.isEmpty && active {+ ContentUnavailableView.search(text: query).accessibilityIdentifier("works-search-empty")+ } else {+ List {+ if !isHub {+ Text("\(members.count) works · \(sortPhrase)")+ .font(.caption).foregroundStyle(AsterismColors.secondaryText)+ .constellationListRow()+ }+ Section {+ ForEach(rows, id: \.id) { work in+ library.workButton(work, titles: library.titlesByWorkID, showsSeries: true,+ siteNames: siteNames, group: group)+ .listRowBackground(AsterismColors.cardFill)+ .listRowSeparatorTint(AsterismColors.cardBorder)+ .listRowInsets(EdgeInsets())+ .swipeActions(edge: .trailing, allowsFullSwipe: false) {+ Button("Change status…") { library.onChangeStatus(work.id) }+ .tint(AsterismColors.violet)+ }+ .contextMenu {+ Button("Change status…") { library.onChangeStatus(work.id) }+ }+ }+ }+ if !isHub && group == nil && !active {+ Section {+ library.unattachedGroup.constellationListRow()+ } header: {+ HStack {+ ConstellationSectionHeader("Unattached Notes", accent: .violet)+ .accessibilityIdentifier("unattached-section-header")+ Spacer()+ Text("\(library.snapshot.unattachedEntries.count)").constellationPill(.count)+ .accessibilityIdentifier("unattached-entry-count")+ }+ }+ }+ if rows.isEmpty && group != nil {+ Text("No works in this group yet").foregroundStyle(AsterismColors.secondaryText)+ .constellationListRow()+ }+ }+ .insetGroupedListStyle()+ .scrollContentBackground(.hidden)+ .macListChrome()+ .accessibilityElement(children: .contain)+ .accessibilityIdentifier(isHub ? "works-list" : "works-group-\(group?.rawValue ?? "allWorks")")+ }+ }+}
diff --git a/Asterism/Asterism/Views/WorksStatusSheet.swift b/Asterism/Asterism/Views/WorksStatusSheet.swiftnew file mode 100644index 00000000..2f2da17c--- /dev/null+++ b/Asterism/Asterism/Views/WorksStatusSheet.swift@@ -0,0 +1,55 @@+import AsterismCore+import ConstellationKit+import SwiftUI++struct WorksStatusSheet: View {+ @State var model: WorkDetailModel+ @Environment(\.dismiss) private var dismiss+ @State private var saving = false+ @State private var loading = true+ var body: some View {+ NavigationStack {+ Form {+ if model.isEditing {+ ConstellationSegmentedControl(values: ReadingStatus.allCases,+ selection: Binding(get: { model.draftReadingStatus }, set: model.setDraftReadingStatus),+ containerLabel: "Reading status", title: ReadingStatusPresentation.name,+ identifier: ReadingStatusPresentation.controlIdentifier)+ if let prompt = ReadingStatusPresentation.verdictPrompt(model.draftReadingStatus) {+ TextField(prompt, text: $model.draftVerdict, axis: .vertical)+ }+ } else if loading { ProgressView() }+ else if model.isReadOnly {+ Text("Resolve this work's conflicting copies before changing its status.")+ }+ if let error = model.errorMessage { Text(error).foregroundStyle(AsterismColors.amberText) }+ }+ .navigationTitle("Change status")+ .toolbar {+ ToolbarItem(placement: .cancellationAction) {+ Button("Cancel") { model.cancelEditing(); dismiss() }.disabled(saving)+ }+ ToolbarItem(placement: .confirmationAction) {+ Button("Save") {+ saving = true+ Task {+ await model.commitEditing()+ saving = false+ if !model.isEditing { dismiss() }+ }+ }.disabled(saving || !model.isEditing)+ }+ }+ .finishedReadingDialog(model)+ .task {+ await model.load()+ if model.work != nil { model.beginEditing() }+ loading = false+ }+ .onChange(of: model.isEditing) { wasEditing, editing in+ if wasEditing && !editing { dismiss() }+ }+ }.frame(minWidth: 320, minHeight: 240)+ .interactiveDismissDisabled(saving)+ }+}
diff --git a/Asterism/AsterismTests/WorksRedesignTests.swift b/Asterism/AsterismTests/WorksRedesignTests.swiftnew file mode 100644index 00000000..deb2362a--- /dev/null+++ b/Asterism/AsterismTests/WorksRedesignTests.swift@@ -0,0 +1,135 @@+import AsterismCore+import Foundation+import Testing+@testable import Asterism++@Suite("Works library destinations")+struct WorksRedesignTests {+ @Test("Hiatus membership is independent of catch-up and excludes completed readers")+ func hiatusMembership() {+ for status in ReadingStatus.allCases {+ let work = TestFixtures.makeWork(workStatus: .hiatus, readingStatus: status)+ #expect(WorksGroup.onHiatus.members(of: [work]).isEmpty == ![.reading, .catchingUp].contains(status))+ #expect(WorksGroup.reading.members(of: [work]).isEmpty)+ #expect(WorksGroup.catchingUp.members(of: [work]).isEmpty == (status != .catchingUp))+ }+ }++ @Test("To-read sorts by creation date and overrides do not change membership")+ func queueOrder() {+ let early = TestFixtures.makeWork(displayTitle: "Z", createdAt: Date(timeIntervalSince1970: 1), readingStatus: .toRead)+ let late = TestFixtures.makeWork(displayTitle: "A", createdAt: Date(timeIntervalSince1970: 2), readingStatus: .toRead)+ #expect(WorksGroup.toRead.sorted([late, early]).map(\.id) == [early.id, late.id])+ #expect(WorksGroup.toRead.sorted([early, late], by: .newestAdded).map(\.id) == [late.id, early.id])+ #expect(WorksGroup.toRead.sorted([early, late], by: .aToZ).map(\.id) == [late.id, early.id])+ }++ @Test("Status date fallbacks use last note, with unknown dates last")+ func statusDateFallbacks() {+ let old = TestFixtures.makeWork(entries: [TestFixtures.makeEntry(lastSharedAt: Date(timeIntervalSince1970: 1))])+ let new = TestFixtures.makeWork(entries: [TestFixtures.makeEntry(lastSharedAt: Date(timeIntervalSince1970: 2))])+ let unknown = TestFixtures.makeWork()+ #expect(WorksGroup.onHiatus.sorted([unknown, new, old]).map(\.id) == [old.id, new.id, unknown.id])+ for group in [WorksGroup.finished, .abandoned] {+ #expect(group.sorted([old, unknown, new]).map(\.id) == [new.id, old.id, unknown.id])+ }+ }++ @Test("Replacing a token preserves the other dimensions")+ func tokenReplacement() {+ let tokens = [WorksSearchToken(dimension: .tag, label: "old", filter: WorksFilter(tag: "old")),+ WorksSearchToken(dimension: .site, label: "example.com", filter: WorksFilter(hostname: "example.com")),+ WorksSearchToken(dimension: .tag, label: "new", filter: WorksFilter(tag: "new"))]+ let filter = WorksSearchToken.filter(from: tokens)+ #expect(filter.tag == "new")+ #expect(filter.hostname == "example.com")+ #expect(WorksSearchToken.normalized(tokens).count == 2)+ }++ @Test("Group search offers only applicable dimensions")+ func scopedSuggestions() {+ let all = WorksSearchToken.suggestions(query: "", values: [], group: nil).map(\.dimension)+ #expect(all.contains(.reading))+ let paused = WorksSearchToken.suggestions(query: "", values: [], group: .onHiatus).map(\.dimension)+ #expect(!paused.contains(.reading))+ #expect(!paused.contains(.status))+ #expect(paused.contains(.series))+ }+ @Test("Choosing another dimension keeps its prefix until a value is selected")+ func dimensionSelection() {+ let tag = WorksSearchToken(dimension: .tag, label: "fantasy", filter: WorksFilter(tag: "fantasy"))+ let dimension = WorksSearchToken(dimension: .site, label: "Site", filter: WorksFilter())+ let choice = WorksSearchToken.selection([tag, dimension], replacing: [tag], query: "")+ #expect(choice.tokens == [tag])+ #expect(choice.query == "site:")+ let normalized = WorksSearchToken.selection(choice.tokens, replacing: [tag, dimension], query: choice.query)+ #expect(normalized.query == "site:")+ let site = WorksSearchToken(dimension: .site, label: "example.com", filter: WorksFilter(hostname: "example.com"))+ #expect(WorksSearchToken.selection([tag, site], replacing: [tag], query: "site:").query.isEmpty)+ #expect(WorksSearchToken.selection([], replacing: [tag], query: "story").query == "story")+ }++ @Test("Every token dimension maps onto the existing filter model")+ func everyDimension() {+ let series = UUID(), creator = UUID()+ let expected = WorksFilter(type: .untyped, tag: "fantasy", hostname: "example.com", series: .series(series),+ creator: .creator(creator), workStatus: .hiatus, readingStatus: .catchingUp, releaseDays: .hasReleaseDays)+ let filters: [(WorksSearchToken.Dimension, WorksFilter)] = [+ (.type, WorksFilter(type: expected.type)), (.tag, WorksFilter(tag: expected.tag)),+ (.site, WorksFilter(hostname: expected.hostname)), (.series, WorksFilter(series: expected.series)),+ (.creator, WorksFilter(creator: expected.creator)), (.status, WorksFilter(workStatus: expected.workStatus)),+ (.reading, WorksFilter(readingStatus: expected.readingStatus)), (.releases, WorksFilter(releaseDays: expected.releaseDays))]+ #expect(WorksSearchToken.filter(from: filters.map { WorksSearchToken(dimension: $0.0, label: $0.0.title, filter: $0.1) }) == expected)+ }++ @Test("Named values cannot collide with empty-value filter suggestions")+ func tokenIdentities() {+ let tokens: [WorksSearchToken] = [+ .init(dimension: .series, label: "No series", filter: WorksFilter(series: .noSeries)),+ .init(dimension: .series, label: "No series", filter: WorksFilter(series: .series(UUID()))),+ .init(dimension: .creator, label: "No creators", filter: WorksFilter(creator: .noCreators)),+ .init(dimension: .creator, label: "No creators", filter: WorksFilter(creator: .creator(UUID()))),+ .init(dimension: .type, label: "Untyped", filter: WorksFilter(type: .untyped)),+ .init(dimension: .type, label: "Untyped", filter: WorksFilter(type: .named("untyped")))]+ #expect(Set(tokens.map(\.id)).count == tokens.count)+ }++ @Test("Renamed token labels refresh without clearing the title query")+ func refreshedTokenLabels() {+ let work = TestFixtures.makeWork(hostname: "example.com")+ let options = WorksFilterOptions(works: [work], siteNames: .empty)+ let old = [WorksSearchToken(dimension: .site, label: "Old name", filter: WorksFilter(hostname: "example.com"))]+ let refreshed = WorksSearchToken.refreshed(old, options: options, siteNames: SiteNames(["example.com": "New name"]))+ #expect(refreshed.first?.label == "New name")+ #expect(refreshed.first?.id == old.first?.id)+ #expect(WorksSearchToken.selection(refreshed, replacing: old, query: "story").query == "story")+ #expect(WorksSearchToken.refreshed(old, options: .empty, siteNames: .empty).isEmpty)+ }++ @Test("Dimension suggestions do not build the library's value vocabulary")+ func lazySuggestions() {+ var builtValues = false+ func values() -> [WorksSearchToken] { builtValues = true; return [] }+ #expect(!WorksSearchToken.suggestions(query: "", values: values(), group: nil).isEmpty)+ #expect(!builtValues)+ _ = WorksSearchToken.suggestions(query: "site:", values: values(), group: nil)+ #expect(builtValues)+ }++ @Test("Mixed series sections keep in-progress series newest first")+ func seriesOrderingAcrossSections() {+ func progress(_ name: String, _ status: ReadingStatus, _ date: Date) -> SeriesProgress {+ let series = SeriesDisplay(id: UUID(), name: name, createdAt: .distantPast)+ return SeriesProgress.build(series: series, members: [TestFixtures.makeWork(+ entries: [TestFixtures.makeEntry(lastSharedAt: date)], readingStatus: status)])+ }+ let old = progress("A", .reading, TestFixtures.earlierDate)+ let completed = progress("B", .finished, TestFixtures.fixedDate)+ let recent = progress("C", .reading, TestFixtures.laterDate)+ let rows = [old, completed, recent]+ for input in [rows, Array(rows.reversed()), [recent, old, completed]] {+ #expect(input.sorted(by: SeriesProgress.precedes).map(\.series.id) == [recent.series.id, old.series.id, completed.series.id])+ }+ }++}
diff --git a/Packages/AsterismCore/Sources/AsterismCore/SeriesProgress.swift b/Packages/AsterismCore/Sources/AsterismCore/SeriesProgress.swiftnew file mode 100644index 00000000..93e4bffb--- /dev/null+++ b/Packages/AsterismCore/Sources/AsterismCore/SeriesProgress.swift@@ -0,0 +1,72 @@+import Foundation++/// A series' reading progress, derived without persisting any extra state.+public struct SeriesProgress: Equatable, Sendable {+ public enum Section: String, CaseIterable, Sendable {+ case inProgress = "In progress"+ case notStarted = "Not started"+ case completed = "Completed"+ }++ public let series: SeriesDisplay+ public let members: [WorkSnapshot]+ public let section: Section+ public var nextUp: WorkSnapshot? { members.first { !$0.readingStatus.isDone } }+ public var finishedCount: Int { members.filter { $0.readingStatus == .finished }.count }+ public let lastNoted: Date?++ /// Front first, then the nearest previous and next neighbours, without duplicates.+ public var covers: [WorkSnapshot] {+ guard !members.isEmpty else { return [] }+ let nextID = nextUp?.id+ let front = members.firstIndex { $0.id == nextID } ?? 0+ let indices = [front] + (1..<members.count).flatMap { [front - $0, front + $0] }+ var used: Set<Int> = []+ return indices.filter { members.indices.contains($0) && used.insert($0).inserted }+ .prefix(3).map { members[$0] }+ }++ public static func build(series: SeriesDisplay, members: [WorkSnapshot]) -> Self {+ let ordered = members.sorted(by: SeriesMemberOrdering.precedes)+ let statuses = ordered.map(\.readingStatus)+ let section: Section+ if !statuses.isEmpty && statuses.allSatisfy(\.isDone) && statuses.contains(.finished) {+ section = .completed+ } else if statuses.contains(.reading) || statuses.contains(.catchingUp)+ || (statuses.contains(.finished) && statuses.contains(.toRead)) {+ section = .inProgress+ } else {+ // Empty and wholly abandoned series stay reachable without claiming completion.+ section = .notStarted+ }+ return Self(series: series, members: ordered, section: section,+ lastNoted: ordered.lazy.flatMap(\.entries).map(\.lastSharedAt).max())+ }++ /// Section order first makes the mixed-section comparison transitive.+ /// Dates were derived at build time, so sorting never rescans notes.+ public static func precedes(_ lhs: Self, _ rhs: Self) -> Bool {+ if lhs.section != rhs.section {+ return Section.allCases.firstIndex(of: lhs.section)! < Section.allCases.firstIndex(of: rhs.section)!+ }+ if lhs.section == .inProgress, lhs.lastNoted != rhs.lastNoted {+ switch (lhs.lastNoted, rhs.lastNoted) {+ case let (left?, right?): return left > right+ case (_?, nil): return true+ case (nil, _?): return false+ case (nil, nil): break+ }+ }+ return SeriesOrdering.precedes(lhs.series, rhs.series)+ }++ /// Only a single numeric chapter can safely be incremented. Volume/chapter+ /// pairs and interludes deliberately fall back to the work URL.+ public static func nextChapter(in work: WorkSnapshot) -> Int? {+ guard let entry = work.entries.max(by: { $0.lastSharedAt < $1.lastSharedAt }),+ let key = ChapterKeyDerivation.key(+ chapterSequence: entry.chapterSequence, chapterTitle: entry.chapterTitle),+ key.components.count == 1, let number = key.components.first else { return nil }+ return number + 1+ }+}
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/SeriesProgressTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/SeriesProgressTests.swiftnew file mode 100644index 00000000..a59802e9--- /dev/null+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/SeriesProgressTests.swift@@ -0,0 +1,60 @@+import Foundation+import Testing+@testable import AsterismCore++@Suite("Series reading progress")+struct SeriesProgressTests {+ let series = SeriesDisplay(id: UUID(), name: "Series", createdAt: .distantPast)+ private func work(_ position: Double, _ status: ReadingStatus) -> WorkSnapshot {+ WorkSnapshot(id: UUID(), displayTitle: "Book \(position)", lastParsedTitle: nil,+ memberships: [], genericNotes: "", genreTags: [], titleProvenance: .manual,+ createdAt: .distantPast, modifiedAt: .distantPast, entries: [], readingStatus: status,+ membership: SeriesMembership(seriesID: series.id, position: position), series: series)+ }++ @Test("Next up respects fractional reading order and skips abandoned works")+ func nextUp() {+ let first = work(1, .finished), skipped = work(2, .abandoned), next = work(2.5, .toRead)+ let progress = SeriesProgress.build(series: series, members: [next, skipped, first])+ #expect(progress.nextUp?.id == next.id)+ #expect(progress.members.map(\.id) == [first.id, skipped.id, next.id])+ #expect(progress.section == .inProgress)+ #expect(progress.finishedCount == 1)+ }++ @Test("Every status combination remains represented", arguments: ReadingStatus.allCases, ReadingStatus.allCases)+ func sections(first: ReadingStatus, second: ReadingStatus) {+ let progress = SeriesProgress.build(series: series, members: [work(1, first), work(2, second)])+ let complete = first.isDone && second.isDone && [first, second].contains(.finished)+ #expect((progress.section == .completed) == complete)+ #expect((progress.nextUp == nil) == (first.isDone && second.isDone))+ }++ @Test("Cover selection is unique at both ends and puts next up in front")+ func fans() {+ for count in 1...5 {+ for nextIndex in 0..<count {+ let works = (0..<count).map { work(Double($0), $0 < nextIndex ? .finished : .toRead) }+ let progress = SeriesProgress.build(series: series, members: works.reversed())+ #expect(progress.covers.first?.id == works[nextIndex].id)+ #expect(progress.covers.count == min(count, 3))+ #expect(Set(progress.covers.map(\.id)).count == progress.covers.count)+ if nextIndex > 0 { #expect(progress.covers[1].id == works[nextIndex - 1].id) }+ if nextIndex == count - 1 && count >= 3 {+ #expect(progress.covers[2].id == works[nextIndex - 2].id)+ }+ }+ }+ }++ @Test("Completed series put book one in front; empty series stay reachable")+ func completedAndEmpty() {+ let first = work(1, .finished), last = work(2, .abandoned)+ let completed = SeriesProgress.build(series: series, members: [last, first])+ #expect(completed.covers.first?.id == first.id)+ #expect(completed.nextUp == nil)+ let empty = SeriesProgress.build(series: series, members: [])+ #expect(empty.section == .notStarted)+ #expect(empty.covers.isEmpty)+ }+}
diff --git a/docs/Asterism Rethink.dc.html b/docs/Asterism Rethink.dc.htmlnew file mode 100644index 00000000..5148d5ba--- /dev/null+++ b/docs/Asterism Rethink.dc.html @@ -0,0 +1,1320 @@+<!DOCTYPE html>+<html>+<head>+<meta charset="utf-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<script src="./support.js"></script>+</head>+<body>+<x-dc>+<helmet data-dc-atomics>+<meta name="design_doc_mode" content="canvas">+<link rel="preconnect" href="https://fonts.googleapis.com">+<link href="https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400..700&display=swap" rel="stylesheet">+<style>+body{margin:0;background:#101118;color:#e9ecf5;font-family:-apple-system,"SF Pro Text","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased}+a{color:oklch(0.82 0.12 220);text-decoration:none}a:hover{color:oklch(0.9 0.09 220)}+html{background:#101118}+.dv-turn{background:#101118;padding:48px 56px 44px;border-bottom:1px solid rgba(255,255,255,.08);scroll-margin-top:16px}+.dv-thd{display:flex;align-items:baseline;gap:12px;margin:0 0 10px}+.dv-tid{font:600 11px ui-monospace,Menlo,monospace;padding:3px 8px;background:#e9ecf5;color:#101118;border-radius:4px;text-decoration:none}+.dv-tname{font:550 30px/1.1 'Newsreader',Georgia,serif;color:#e9ecf5;letter-spacing:-.01em}+.dv-intro{max-width:880px;margin:0 0 28px;font:14px/1.55 -apple-system,system-ui,sans-serif;color:#a9b0c2;text-wrap:pretty}+.dv-opts{display:flex;flex-wrap:wrap;gap:40px;align-items:flex-start}+.dv-opt{flex:none;display:flex;flex-direction:column;gap:12px;scroll-margin-top:16px}+.dv-oid{font:600 10.5px ui-monospace,Menlo,monospace;padding:3px 7px;background:rgba(255,255,255,.1);color:#e9ecf5;border-radius:5px;text-decoration:none}+.dv-olabel{display:flex;align-items:baseline;gap:9px;font:600 14px/1.3 -apple-system,system-ui,sans-serif;color:#e9ecf5}+.dv-olabel em{font-style:normal;font-weight:400;color:#8f97ad;font-size:12px}+.dv-card{max-width:100%;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.08)}+.dv-note{margin:0;padding:0 0 0 16px;font:12.5px/1.55 -apple-system,system-ui,sans-serif;color:#a9b0c2;text-wrap:pretty}+.dv-note li{margin:0 0 4px}+.dv-note b{color:#e9ecf5;font-weight:600}+.dv-opt:target .dv-oid{background:oklch(0.72 0.13 220);color:#fff}+.dv-next{margin:28px 0 0;font:12.5px/1.5 -apple-system,system-ui,sans-serif;color:#8f97ad}+</style>+</helmet>+<section class="dv-turn" id="t5">+<div class="dv-thd"><a class="dv-tid" href="#t5">5</a><span class="dv-tname">2b: opening a group</span></div>+<p class="dv-intro">Tapping a tile or row in <a class="dv-oid" href="#2b">2b</a> pushes a list. <b style="color:#e9ecf5">Status groups</b> (Reading, Catching up, To read, On hiatus, Finished, Abandoned) share one list screen. Its sort, subgrouping and row details depend on the status, and search is limited to the group. <b style="color:#e9ecf5">Series</b> opens a list of series rather than works, and each series opens the series page (<a class="dv-oid" href="#2d">2d</a>). Catching up is shown in <a class="dv-oid" href="#4a">4a</a>.</p>+<div class="dv-opts">++<div class="dv-opt" id="5a">+<div class="dv-olabel"><a class="dv-oid" href="#5a">5a</a>Status group <em>Works › To read</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="5a To read group" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;justify-content:space-between;padding:2px 16px 0">+<div style="height:36px;padding:0 14px 0 10px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;gap:4px;color:#c9cfdd;font-size:14px;font-weight:600"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6 6 6"></path></svg>Works</div>+<div style="display:flex;gap:8px">+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4v16M3 16l4 4 4-4M17 20V4M13 8l4-4 4 4"></path></svg></div>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg></div>+</div>+</div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:33px;letter-spacing:-.01em;padding:6px 20px 0">To read</div>+<div style="font-size:12.5px;color:#8f97ad;padding:2px 20px 12px">12 works · oldest added first</div>+<div style="margin:0 16px;height:38px;border-radius:19px;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.1);display:flex;align-items:center;gap:8px;padding:0 13px;color:#8f97ad;font-size:15px"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-4-4"></path></svg>Search in To read</div>+<div style="margin:14px 16px 0;padding:0 12px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<sc-for list="{{ toRead5a }}" as="r" hint-placeholder-count="6">+<div style="display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid {{r.sep}}">+<div style="width:36px;height:50px;flex-shrink:0;border-radius:7px;background:linear-gradient(155deg,{{r.c1}},{{r.c2}});box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:4px">+<span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.t}}</span>+<div style="display:flex;align-items:center;gap:6px;min-width:0"><span style="flex-shrink:0;font-size:10.5px;font-weight:650;color:oklch(0.85 0.11 305);background:oklch(0.82 0.12 305 / .12);border:1px solid oklch(0.82 0.12 305 / .35);border-radius:9px;padding:0 7px">{{r.ty}}</span><span style="font-size:12px;color:#8f97ad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.meta}}</span></div>+<sc-if value="{{r.hasLine}}" hint-placeholder-val="{{ false }}"><span style="font-size:12px;color:{{r.lineC}};white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.line}}</span></sc-if>+</div>+<span style="color:#8f97ad;font-size:16px">›</span>+</div>+</sc-for>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>One flat list, oldest added first</b>, because To read is a queue. The date each work was added is on its row. No subgroups.</li>+<li><b>Rows match the rest of the app</b>: cover, title, type tag, one detail line, and a tap opens the work. No row buttons.</li>+<li><b>Search only covers this group.</b> Tokens (tag, site, type) narrow it further, and there's no filter menu. ↕ changes the sort.</li>+<li>Swipe a row to change its status, e.g. to Abandoned.</li>+</ul>+</div>++<div class="dv-opt" id="5d">+<div class="dv-olabel"><a class="dv-oid" href="#5d">5d</a>Status group <em>Works › Reading</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="5d Reading group" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;justify-content:space-between;padding:2px 16px 0">+<div style="height:36px;padding:0 14px 0 10px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;gap:4px;color:#c9cfdd;font-size:14px;font-weight:600"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6 6 6"></path></svg>Works</div>+<div style="display:flex;gap:8px">+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4v16M3 16l4 4 4-4M17 20V4M13 8l4-4 4 4"></path></svg></div>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg></div>+</div>+</div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:33px;letter-spacing:-.01em;padding:6px 20px 0">Reading</div>+<div style="font-size:12.5px;color:#8f97ad;padding:2px 20px 12px">38 works · last noted first</div>+<div style="margin:0 16px;height:38px;border-radius:19px;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.1);display:flex;align-items:center;gap:8px;padding:0 13px;color:#8f97ad;font-size:15px"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-4-4"></path></svg>Search in Reading</div>+<div style="margin:14px 16px 0;padding:0 12px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<sc-for list="{{ reading5d }}" as="r" hint-placeholder-count="6">+<div style="display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid {{r.sep}}">+<div style="width:36px;height:50px;flex-shrink:0;border-radius:7px;background:linear-gradient(155deg,{{r.c1}},{{r.c2}});box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:4px">+<span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.t}}</span>+<div style="display:flex;align-items:center;gap:6px;min-width:0"><span style="flex-shrink:0;font-size:10.5px;font-weight:650;color:oklch(0.85 0.11 305);background:oklch(0.82 0.12 305 / .12);border:1px solid oklch(0.82 0.12 305 / .35);border-radius:9px;padding:0 7px">{{r.ty}}</span><span style="font-size:12px;color:#8f97ad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.meta}}</span></div>+<sc-if value="{{r.hasLine}}" hint-placeholder-val="{{ false }}"><span style="font-size:12px;color:{{r.lineC}};white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.line}}</span></sc-if>+</div>+<span style="color:#8f97ad;font-size:16px">›</span>+</div>+</sc-for>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>The same screen as To read (<a class="dv-oid" href="#5a">5a</a>)</b> with a different sort and detail line: last noted first, and each row shows your last chapter and when you noted it. Works releasing today add "· new today" in cyan.</li>+<li>This is the pattern every regular status group follows. On hiatus sorts by longest paused and shows "Paused since Jun". Finished and Abandoned sort by date and show "Finished Aug 2026".</li>+<li>Catching up is the only group with extra UI (progress and how far behind, <a class="dv-oid" href="#4a">4a</a>), because "behind" is what the group is about.</li>+</ul>+</div>++<div class="dv-opt" id="5b">+<div class="dv-olabel"><a class="dv-oid" href="#5b">5b</a>Series <em>Works › Series, each opens <a class="dv-oid" href="#2d">2d</a></em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="5b Series index" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;justify-content:space-between;padding:2px 16px 0">+<div style="height:36px;padding:0 14px 0 10px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;gap:4px;color:#c9cfdd;font-size:14px;font-weight:600"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6 6 6"></path></svg>Works</div>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg></div>+</div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:33px;letter-spacing:-.01em;padding:6px 20px 0">Series</div>+<div style="font-size:12.5px;color:#8f97ad;padding:2px 20px 4px">7 series · 22 works</div>+<sc-for list="{{ series5b }}" as="g" hint-placeholder-count="2">+<div style="display:flex;align-items:center;gap:7px;padding:16px 24px 8px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">{{g.l}}</span></div>+<div style="display:flex;flex-direction:column;gap:9px;padding:0 16px">+<sc-for list="{{g.rows}}" as="s" hint-placeholder-count="2">+<div style="display:flex;gap:14px;align-items:center;padding:10px 14px 10px 10px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);opacity:{{s.op}}">+<div style="position:relative;width:62px;height:62px;flex-shrink:0">+<sc-if value="{{s.n1}}" hint-placeholder-val="{{ false }}">+<div style="position:absolute;left:24px;top:8px;width:32px;height:46px;border-radius:5px;border:1.2px dashed rgba(170,200,255,.35);transform:rotate(9deg);box-sizing:border-box"></div>+<div style="position:absolute;left:10px;top:4px;width:34px;height:50px;border-radius:6px;background:linear-gradient(155deg,{{s.a.c1}},{{s.a.c2}});border:1px solid rgba(10,12,24,.8);box-shadow:0 4px 12px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.25)"></div>+</sc-if>+<sc-if value="{{s.n2}}" hint-placeholder-val="{{ false }}">+<div style="position:absolute;left:24px;top:7px;width:33px;height:48px;border-radius:5px;background:linear-gradient(155deg,{{s.b.c1}},{{s.b.c2}});transform:rotate(8deg);opacity:.85;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:6px;top:4px;width:34px;height:50px;border-radius:6px;background:linear-gradient(155deg,{{s.a.c1}},{{s.a.c2}});transform:rotate(-4deg);border:1px solid rgba(10,12,24,.8);box-shadow:0 4px 12px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.25)"></div>+</sc-if>+<sc-if value="{{s.n3}}" hint-placeholder-val="{{ true }}">+<div style="position:absolute;left:2px;top:8px;width:32px;height:46px;border-radius:5px;background:linear-gradient(155deg,{{s.c.c1}},{{s.c.c2}});transform:rotate(-9deg);opacity:.75;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:28px;top:8px;width:32px;height:46px;border-radius:5px;background:linear-gradient(155deg,{{s.b.c1}},{{s.b.c2}});transform:rotate(9deg);opacity:.85;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:14px;top:4px;width:34px;height:50px;border-radius:6px;background:linear-gradient(155deg,{{s.a.c1}},{{s.a.c2}});border:1px solid rgba(10,12,24,.8);box-shadow:0 4px 12px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.25)"></div>+</sc-if>+<sc-if value="{{s.hasMore}}" hint-placeholder-val="{{ false }}"><span style="position:absolute;right:-2px;bottom:0;font-size:9.5px;font-weight:700;padding:1px 5px;border-radius:7px;background:rgba(10,14,30,.85);border:1px solid rgba(170,200,255,.25);color:#c9cfdd">{{s.more}}</span></sc-if>+</div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:6px">+<div style="display:flex;align-items:baseline;gap:8px"><span style="flex:1;min-width:0;font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{s.name}}</span><span style="font-size:12px;color:#8f97ad;flex-shrink:0">{{s.count}}</span></div>+<div style="display:flex;gap:3px;height:4px"><sc-for list="{{s.segs}}" as="x" hint-placeholder-count="4"><div style="flex:1;border-radius:2px;background:{{x.bg}}"></div></sc-for></div>+<span style="font-size:12px;color:{{s.nextC}};white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{s.next}}</span>+</div>+<span style="color:#8f97ad;font-size:16px">›</span>+</div>+</sc-for>+</div>+</sc-for>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>A list of series, not works.</b> Each card shows a fanned stack of covers, a work count, a progress bar with one segment per work (cyan = finished, soft cyan = reading, dim = to read), and what's next.</li>+<li><b>Grouped by progress</b>: In progress, Not started, Completed. Completed series fade back, like finished works do.</li>+<li><b>The "next" line is the same as the Next up card in <a class="dv-oid" href="#2d">2d</a></b>, so you can see where to continue in each series without opening it.</li>+<li>Tapping a card opens the series page (<a class="dv-oid" href="#2d">2d</a>), and + creates a series. Works get assigned to a series from the work's edit screen, as they are now.</li>+</ul>+</div>++<div class="dv-opt" id="5c">+<div class="dv-olabel"><a class="dv-oid" href="#5c">5c</a>Fan by series size <em>the same rules for 2c, 2d, 3d and 5b</em></div>+<div style="width:390px;box-sizing:border-box;padding:22px 20px;border-radius:28px;background:linear-gradient(#141228,#070814);border:1px solid rgba(170,200,255,.14);box-shadow:0 24px 70px rgba(0,0,0,.55);display:grid;grid-template-columns:1fr 1fr;gap:26px 16px;color:#e9ecf5">+<div style="display:flex;flex-direction:column;align-items:center;gap:10px">+<div style="position:relative;width:120px;height:120px">+<div style="position:absolute;left:52px;top:18px;width:60px;height:86px;border-radius:9px;border:1.5px dashed rgba(170,200,255,.35);transform:rotate(9deg);box-sizing:border-box"></div>+<div style="position:absolute;left:22px;top:10px;width:64px;height:92px;border-radius:10px;background:linear-gradient(155deg,#9a9ab0,#2a2a40);border:1px solid rgba(10,12,24,.8);box-shadow:0 6px 16px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.25)"></div>+</div>+<div style="text-align:center"><div style="font-size:13px;font-weight:600">1 work</div><div style="font-size:11.5px;color:#8f97ad;line-height:1.4">One cover with a dashed empty slot behind it for the next part</div></div>+</div>+<div style="display:flex;flex-direction:column;align-items:center;gap:10px">+<div style="position:relative;width:120px;height:120px">+<div style="position:absolute;left:46px;top:14px;width:62px;height:90px;border-radius:9px;background:linear-gradient(155deg,#e0b0d0,#5a3a60);transform:rotate(8deg);opacity:.85;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:12px;top:10px;width:64px;height:92px;border-radius:10px;background:linear-gradient(155deg,#43c47e,#1f5a46);transform:rotate(-4deg);border:1px solid rgba(10,12,24,.8);box-shadow:0 6px 16px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.25)"></div>+</div>+<div style="text-align:center"><div style="font-size:13px;font-weight:600">2 works</div><div style="font-size:11.5px;color:#8f97ad;line-height:1.4">An offset pair, so no empty space on one side</div></div>+</div>+<div style="display:flex;flex-direction:column;align-items:center;gap:10px">+<div style="position:relative;width:120px;height:120px">+<div style="position:absolute;left:4px;top:16px;width:60px;height:86px;border-radius:9px;background:linear-gradient(155deg,#d9b36a,#6a4a22);transform:rotate(-10deg);opacity:.75;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:56px;top:16px;width:60px;height:86px;border-radius:9px;background:linear-gradient(155deg,#6ac0d8,#1f4a5a);transform:rotate(10deg);opacity:.85;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:28px;top:8px;width:64px;height:94px;border-radius:10px;background:linear-gradient(155deg,#a08a7a,#3c2f4a);border:1px solid rgba(10,12,24,.8);box-shadow:0 6px 16px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.25)"></div>+</div>+<div style="text-align:center"><div style="font-size:13px;font-weight:600">3 works</div><div style="font-size:11.5px;color:#8f97ad;line-height:1.4">The full fan</div></div>+</div>+<div style="display:flex;flex-direction:column;align-items:center;gap:10px">+<div style="position:relative;width:120px;height:120px">+<div style="position:absolute;left:4px;top:16px;width:60px;height:86px;border-radius:9px;background:linear-gradient(155deg,#5d86d8,#23335c);transform:rotate(-10deg);opacity:.75;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:56px;top:16px;width:60px;height:86px;border-radius:9px;background:linear-gradient(155deg,#c98a5a,#4a2a1a);transform:rotate(10deg);opacity:.85;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:28px;top:8px;width:64px;height:94px;border-radius:10px;background:linear-gradient(155deg,#6a8fe0,#2a3570);border:1px solid rgba(10,12,24,.8);box-shadow:0 6px 16px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.25)"></div>+<span style="position:absolute;right:0;bottom:6px;font-size:11px;font-weight:700;padding:2px 7px;border-radius:9px;background:rgba(10,14,30,.88);border:1px solid rgba(170,200,255,.25);color:#c9cfdd">+1</span>+</div>+<div style="text-align:center"><div style="font-size:13px;font-weight:600">4+ works</div><div style="font-size:11.5px;color:#8f97ad;line-height:1.4">Three covers plus a "+N" badge</div></div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>The front cover is the next-up work</b>, the first one that isn't finished, not book 1. The covers behind it are the works either side of it in reading order. For Ironway (<a class="dv-oid" href="#5b">5b</a>) that puts Beacon Lines in front.</li>+<li><b>The dashed slot on a 1-work series</b> is a placeholder for a part that hasn't been added yet. Without it, a series of one looks exactly like a single work. It disappears once a second work is added.</li>+<li><b>Completed series</b> put book 1 in front, since there's nothing left to read next.</li>+<li>Covers without art use the same gradient-and-initials fallback as elsewhere.</li>+</ul>+</div>++</div>+</section>+<section class="dv-turn" id="t4">+<div class="dv-thd"><a class="dv-tid" href="#t4">4</a><span class="dv-tname">Catching up: how "behind" works</span></div>+<p class="dv-intro">Each work stores <b style="color:#e9ecf5">latest released</b>, set by you and counted up on its release days. Behind = latest − the chapter number read from your last note's title. A catching-up row can be in one of four states. <b style="color:#e9ecf5">Exact</b>: you confirmed the latest count. <b style="color:#e9ecf5">Estimated</b>: release days have added to it since you last confirmed, shown with a ~. <b style="color:#e9ecf5">Unknown</b>: no latest count yet, or the chapter number couldn't be parsed, so no bar. <b style="color:#e9ecf5">Caught up</b>: behind reached 0, and the app offers to move the work back to Reading. <a class="dv-oid" href="#4b">4b</a> is how you correct the count. Rows in <a class="dv-oid" href="#1a">1a</a>, <a class="dv-oid" href="#2a">2a</a> and <a class="dv-oid" href="#3a">3a</a> now include the unknown state.</p>+<div class="dv-opts">++<div class="dv-opt" id="4a">+<div class="dv-olabel"><a class="dv-oid" href="#4a">4a</a>The four states <em>Works → Catching up</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="4a Catching up states" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;align-items:center;gap:8px;padding:2px 16px 0">+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6 6 6"></path></svg></div>+</div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:33px;letter-spacing:-.01em;padding:4px 20px 0">Catching up</div>+<div style="font-size:12.5px;color:#8f97ad;padding:2px 20px 14px">4 works · ~42 chapters behind</div>+<div style="display:flex;flex-direction:column;gap:9px;padding:0 16px">+<div style="margin:0 0 3px;padding:12px 14px;border-radius:18px;background:oklch(0.82 0.12 220 / .1);border:1px solid oklch(0.82 0.12 220 / .45);box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 0 24px oklch(0.82 0.12 220 / .15);display:flex;flex-direction:column;gap:10px">+<div style="display:flex;gap:10px;align-items:center"><span style="font-size:16px;color:oklch(0.88 0.09 220)">✦</span><span style="flex:1;font-size:13.5px;line-height:1.35"><b style="font-weight:600">Caught up on Orbital Decay.</b> <span style="color:#b6bdd1">Ch 112 was the latest. Move it back to Reading?</span></span></div>+<div style="display:flex;gap:8px"><div style="flex:1;height:34px;border-radius:17px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:#fff;background:linear-gradient(100deg,oklch(0.72 0.13 220),oklch(0.68 0.14 305));box-shadow:inset 0 1px 0 rgba(255,255,255,.3)">Move to Reading</div><div style="flex:1;height:34px;border-radius:17px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.18)">Not yet, more is out</div></div>+</div>+<div style="display:flex;align-items:center;gap:12px;padding:9px 14px 9px 9px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:44px;height:62px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,#a7d6f2,#4a6fa8);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:6px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">The Countdown of My Death is Spamming My Status Window</div>+<div style="display:flex;align-items:center;gap:8px"><div style="flex:1;height:4px;border-radius:2px;background:rgba(170,200,255,.12)"><div style="width:65%;height:4px;border-radius:2px;background:oklch(0.82 0.12 220)"></div></div><span style="font-size:12px;color:#8f97ad">26 / 40</span></div>+<div style="font-size:11.5px;color:#8f97ad">Latest confirmed today</div>+</div>+<div style="display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0"><span style="font-size:20px;font-weight:700;color:oklch(0.85 0.11 220);line-height:1.1">14</span><span style="font-size:10.5px;color:#8f97ad">behind</span></div>+</div>+<div style="display:flex;align-items:center;gap:12px;padding:9px 14px 9px 9px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:44px;height:62px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,#88b060,#2a4a20);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:6px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">Dungeon Quartermaster</div>+<div style="display:flex;align-items:center;gap:8px"><div style="flex:1;height:4px;border-radius:2px;background:rgba(170,200,255,.12)"><div style="width:62%;height:4px;border-radius:2px;background:oklch(0.82 0.12 220)"></div><div style="width:0;height:0"></div></div><span style="font-size:12px;color:#8f97ad">42 / ~68</span></div>+<div style="font-size:11.5px;color:oklch(0.85 0.11 305)">+4 from release days since 2 Sep · <span style="text-decoration:underline;text-underline-offset:2px">Check</span></div>+</div>+<div style="display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0"><span style="font-size:20px;font-weight:700;color:oklch(0.85 0.11 220);line-height:1.1">~26</span><span style="font-size:10.5px;color:#8f97ad">behind</span></div>+</div>+<div style="display:flex;align-items:center;gap:12px;padding:9px 14px 9px 9px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:44px;height:62px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,#9a9ab0,#2a2a40);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:5px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">Hollow Regent</div>+<div style="font-size:12.5px;color:#b6bdd1">Last read Ep 9 · 5 days ago</div>+<div style="font-size:11.5px;color:#8f97ad">~2 releases since (Tue, Fri)</div>+</div>+<div style="height:30px;padding:0 12px;border-radius:15px;flex-shrink:0;display:flex;align-items:center;font-size:12.5px;font-weight:600;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .1);border:1px solid oklch(0.82 0.12 220 / .35)">Set latest</div>+</div>+<div style="display:flex;align-items:center;gap:12px;padding:9px 14px 9px 9px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:44px;height:62px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,#e07a5f,#6f2f2c);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:5px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">Tower of Pale Glass</div>+<div style="font-size:12.5px;color:#b6bdd1">Last read "Interlude: The Glassblower"</div>+<div style="font-size:11.5px;color:#8f97ad">No chapter number found · 12 days ago</div>+</div>+<div style="height:30px;padding:0 12px;border-radius:15px;flex-shrink:0;display:flex;align-items:center;font-size:12.5px;font-weight:600;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .1);border:1px solid oklch(0.82 0.12 220 / .35)">Set latest</div>+</div>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>Exact</b> (Countdown): you confirmed the latest count, so the bar and number show plainly.</li>+<li><b>Estimated</b> (Quartermaster): release days have counted it up since you last confirmed. The ~ and the violet "+4 since…" line say it's a guess, and tapping Check opens <a class="dv-oid" href="#4b">4b</a>.</li>+<li><b>Unknown</b> (Hollow Regent, Tower): no latest count, or the note title has no number. The bar disappears, and the row shows when you last read it plus a rough "releases since" if the work has release days.</li>+<li><b>Caught up</b>: when behind reaches 0, a banner at the top asks whether to move the work back to Reading. It doesn't move automatically, because the count might be wrong.</li>+<li>The list sorts exact and estimated rows by most behind, with unknown rows last.</li>+</ul>+</div>++<div class="dv-opt" id="4b">+<div class="dv-olabel"><a class="dv-oid" href="#4b">4b</a>Correcting the count <em>sheet from Check / Set latest / long-press</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="4b Set latest sheet" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:linear-gradient(#0b0a17,#04050b);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="position:absolute;inset:0;opacity:.35;padding:120px 16px 0;display:flex;flex-direction:column;gap:9px">+<div style="height:80px;border-radius:20px;background:rgba(150,180,255,.08)"></div><div style="height:80px;border-radius:20px;background:rgba(150,180,255,.08)"></div><div style="height:80px;border-radius:20px;background:rgba(150,180,255,.08)"></div>+</div>+<div style="height:54px;position:relative;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="position:absolute;left:8px;right:8px;bottom:8px;box-sizing:border-box;padding:10px 20px 26px;display:flex;flex-direction:column;gap:16px;background:rgba(20,26,50,.78);backdrop-filter:blur(36px) saturate(1.9);-webkit-backdrop-filter:blur(36px) saturate(1.9);border:1px solid rgba(170,200,255,.22);border-radius:38px;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 -10px 50px rgba(0,0,0,.5),0 0 40px oklch(0.6 0.12 260 / .16)">+<div style="width:36px;height:5px;border-radius:3px;background:rgba(255,255,255,.25);margin:0 auto"></div>+<div style="display:flex;align-items:center;justify-content:space-between"><span style="font-size:15px;color:#b6bdd1">Cancel</span><span style="font-size:15px;font-weight:600">Latest released</span><span style="font-size:15px;font-weight:600;color:oklch(0.85 0.11 220)">Save</span></div>+<div style="display:flex;gap:12px;align-items:center"><div style="width:36px;height:50px;flex-shrink:0;border-radius:7px;background:linear-gradient(155deg,#88b060,#2a4a20)"></div><div style="min-width:0;display:flex;flex-direction:column;gap:2px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:17px">Dungeon Quartermaster</span><span style="font-size:12.5px;color:#8f97ad">Royal Road · releases Mon, Fri</span></div></div>+<div style="display:flex;align-items:center;justify-content:center;gap:22px;padding:6px 0 0">+<div style="width:50px;height:50px;border-radius:25px;display:flex;align-items:center;justify-content:center;font-size:24px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.14)">−</div>+<div style="display:flex;flex-direction:column;align-items:center"><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Chapter</span><span style="font-size:56px;font-weight:600;letter-spacing:-.02em;line-height:1.05;color:oklch(0.9 0.08 220);text-shadow:0 0 30px oklch(0.82 0.12 220 / .45)">71</span></div>+<div style="width:50px;height:50px;border-radius:25px;display:flex;align-items:center;justify-content:center;font-size:24px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.14)">+</div>+</div>+<div style="text-align:center;font-size:13px;color:#b6bdd1">Estimated 68 · you're <b style="color:oklch(0.85 0.11 220)">29 behind</b></div>+<div style="padding:0 14px;border-radius:18px;background:rgba(150,180,255,.06);border:1px solid rgba(170,200,255,.12)">+<div style="display:flex;align-items:center;gap:10px;min-height:48px"><span style="flex:1;font-size:14.5px">Count up on release days</span><div style="width:51px;height:31px;border-radius:16px;background:oklch(0.72 0.13 220);position:relative;box-shadow:0 0 14px oklch(0.82 0.12 220 / .4)"><div style="position:absolute;right:2px;top:2px;width:27px;height:27px;border-radius:14px;background:#fff"></div></div></div>+<div style="display:flex;align-items:center;gap:10px;min-height:48px;border-top:1px solid rgba(170,200,255,.1)"><span style="flex:1;font-size:14.5px">Your last chapter</span><span style="font-size:14px;color:#8f97ad">42</span><span style="font-size:13px;color:oklch(0.85 0.11 220)">Edit</span></div>+</div>+<div style="font-size:12px;color:#8f97ad;line-height:1.45;padding:0 4px">"Your last chapter" comes from your latest note, <span style="color:#b6bdd1">"Chapter 42: Inventory Day"</span>. Edit it if the number was read wrong, for example with interludes or seasons.</div>+<div style="height:46px;border-radius:23px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;font-weight:600;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.14)">Check on Royal Road <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"><path d="M7 17L17 7M9 7h8v8"></path></svg></div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>One number to fix.</b> The stepper starts at the estimate. Saving marks the count as confirmed, which removes the ~ and the violet line.</li>+<li><b>"Check on Royal Road" opens the work's URL</b> so you can look it up. Later, RSS could fill this in and the sheet would just confirm it.</li>+<li><b>Your last chapter can be overridden</b> for titles that don't parse (seasons, interludes, ".5" chapters). The override lasts until your next note that does have a number.</li>+<li>You can also open this sheet by long-pressing any catching-up row (Today, Works) and choosing "Set latest…".</li>+</ul>+</div>++</div>+</section>+<section class="dv-turn" id="t1">+<div class="dv-thd"><a class="dv-tid" href="#t1">1</a><span class="dv-tname">Today</span></div>+<p class="dv-intro">The structure works: week strip, then Releasing → Catching up → Noted. What costs you is density and repetition. In the screenshot each row is ~150 pt tall because the type tag takes its own line, "Noted today" repeats on every row under a heading that already says today, the same work shows up in both Catching up and Noted, and every day in the strip has the same dot, so the dots tell you nothing. <a class="dv-oid" href="#1a">1a</a> fixes those problems and keeps the layout. <a class="dv-oid" href="#1b">1b</a> gives each section its own shape. <a class="dv-oid" href="#1c">1c</a> is the out-there one.</p>+<div class="dv-opts">++<div class="dv-opt" id="1a">+<div class="dv-olabel"><a class="dv-oid" href="#1a">1a</a>Refined <em>same structure, half the height</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="1a Today refined" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1.5px 1.5px at 22% 48%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 40% 84%,rgba(255,255,255,.45),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;align-items:flex-end;justify-content:space-between;padding:8px 20px 0">+<div style="display:flex;flex-direction:column;gap:3px"><span style="font-size:11.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#8f97ad">21–27 Sep 2026</span><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:32px;letter-spacing:-.01em;line-height:1.05">Wednesday</span></div>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"></path></svg></div>+</div>+<div style="display:flex;align-items:center;padding:14px 6px 0">+<span style="width:22px;display:flex;justify-content:center;color:oklch(0.82 0.12 220)"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6 6 6"></path></svg></span>+<div style="flex:1;display:flex;justify-content:space-between">+<sc-for list="{{ weekA }}" as="d" hint-placeholder-count="7">+<div style="width:40px;padding:6px 0 7px;border-radius:14px;background:{{d.bg}};border:1px solid {{d.bd}};display:flex;flex-direction:column;align-items:center;gap:2px">+<span style="font-size:12px;font-weight:600;color:{{d.lc}}">{{d.l}}</span>+<span style="font-size:20px;font-weight:500;color:{{d.nc}}">{{d.n}}</span>+<div style="display:flex;gap:3px;height:5px"><sc-for list="{{d.marks}}" as="m" hint-placeholder-count="2"><span style="width:5px;height:5px;border-radius:3px;box-sizing:border-box;background:{{m.bg}};border:1.2px solid {{m.bd}}"></span></sc-for></div>+</div>+</sc-for>+</div>+<span style="width:22px;display:flex;justify-content:center;color:oklch(0.82 0.12 220)"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"></path></svg></span>+</div>+<div style="padding:22px 16px 0;display:flex;flex-direction:column;gap:8px">+<div style="display:flex;align-items:center;gap:7px;padding:0 4px"><span style="font-size:11px;color:oklch(0.82 0.12 220)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Releasing</span><span style="margin-left:auto;font-size:12px;color:#8f97ad">2 of 3 read</span></div>+<sc-for list="{{ rel1a }}" as="r" hint-placeholder-count="3">+<div style="display:flex;align-items:center;gap:12px;padding:8px 12px 8px 8px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:40px;height:56px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,{{r.c1}},{{r.c2}});display:flex;align-items:flex-end;padding:4px 5px;box-sizing:border-box;font-family:'Newsreader',Georgia,serif;font-weight:600;font-size:12px;color:rgba(255,255,255,.9);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)">{{r.ini}}</div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:5px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.t}}</div>+<div style="display:flex;align-items:center;gap:7px;min-width:0"><span style="flex-shrink:0;font-size:10.5px;font-weight:650;color:oklch(0.85 0.11 305);background:oklch(0.82 0.12 305 / .12);border:1px solid oklch(0.82 0.12 305 / .35);border-radius:9px;padding:1px 7px">{{r.ty}}</span><span style="font-size:13px;color:{{r.subC}};white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.sub}}</span></div>+</div>+<div style="width:26px;height:26px;border-radius:13px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:{{r.mkC}};background:{{r.mkBg}};border:1.5px {{r.mkBs}} {{r.mkBd}};box-sizing:border-box">{{r.mk}}</div>+</div>+</sc-for>+<div style="display:flex;align-items:center;gap:7px;padding:14px 4px 0"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Catching up</span></div>+<sc-for list="{{ catch1a }}" as="c" hint-placeholder-count="1">+<div style="display:flex;align-items:center;gap:12px;padding:8px 14px 8px 8px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:40px;height:56px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,{{c.c1}},{{c.c2}});display:flex;align-items:flex-end;padding:4px 5px;box-sizing:border-box;font-family:'Newsreader',Georgia,serif;font-weight:600;font-size:12px;color:rgba(255,255,255,.9);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)">{{c.ini}}</div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:6px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{c.t}}</div>+<div style="font-size:12.5px;color:#8f97ad">{{c.at}}</div>+<sc-if value="{{c.known}}" hint-placeholder-val="{{ true }}"><div style="height:4px;border-radius:2px;background:rgba(170,200,255,.12)"><div style="width:{{c.pct}};height:4px;border-radius:2px;background:oklch(0.82 0.12 220)"></div></div></sc-if>+</div>+<sc-if value="{{c.known}}" hint-placeholder-val="{{ true }}"><div style="display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0"><span style="font-size:19px;font-weight:700;color:oklch(0.85 0.11 220);line-height:1.1">{{c.behind}}</span><span style="font-size:10.5px;color:#8f97ad">behind</span></div></sc-if>+<sc-if value="{{c.unknown}}" hint-placeholder-val="{{ false }}"><div style="height:28px;padding:0 11px;border-radius:14px;flex-shrink:0;display:flex;align-items:center;font-size:12px;font-weight:600;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .1);border:1px solid oklch(0.82 0.12 220 / .35)">Set latest</div></sc-if>+</div>+</sc-for>+<div style="display:flex;align-items:center;gap:7px;padding:14px 4px 0"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Noted</span><span style="margin-left:auto;font-size:12px;color:#8f97ad">4 notes</span></div>+<div style="padding:2px 14px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<sc-for list="{{ noted }}" as="n" hint-placeholder-count="3">+<div style="display:flex;gap:12px;padding:11px 0;border-top:1px solid {{n.sep}}">+<span style="width:38px;flex-shrink:0;font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:#8f97ad;padding-top:3px">{{n.time}}</span>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:2px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{n.t}}</div>+<div style="font-size:12.5px;color:oklch(0.85 0.11 220);white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{n.ch}}</div>+<div style="font-size:13.5px;color:#b6bdd1;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden">{{n.note}}</div>+</div>+</div>+</sc-for>+</div>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7));display:flex"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg></span>Today</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>Dots mean something.</b> Filled dots are notes written, one per note up to three. Hollow violet dots are releases due. You can see at a glance how busy the week is.</li>+<li><b>Type tag moves onto the chapter line</b>, so rows go from ~150 to ~72 pt and about twice as many fit on screen.</li>+<li><b>The ✓ replaces "Noted today".</b> An unread release shows a dashed ring and a cyan chapter line, so it's the row that stands out.</li>+<li><b>Catching up shows how far behind you are</b> instead of your last chapter, which is already under Noted.</li>+<li>A serif day title and a normal 36 pt gear button replace the oversized gear and the date pill.</li>+</ul>+</div>++<div class="dv-opt" id="1b">+<div class="dv-olabel"><a class="dv-oid" href="#1b">1b</a>Release shelf <em>each section gets its own shape</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="1b Today shelf" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1.5px 1.5px at 22% 48%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 40% 84%,rgba(255,255,255,.45),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;align-items:center;justify-content:space-between;padding:4px 20px 0">+<span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:28px;letter-spacing:-.01em">Wed 23 Sep</span>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="3"></circle><circle cx="12" cy="12" r="8" stroke-dasharray="3 2.2"></circle></svg></div>+</div>+<div style="display:flex;justify-content:space-between;padding:10px 20px 0">+<sc-for list="{{ weekA }}" as="d" hint-placeholder-count="7">+<div style="width:40px;padding:5px 0 6px;border-radius:14px;background:{{d.bg}};border:1px solid {{d.bd}};display:flex;flex-direction:column;align-items:center;gap:1px">+<span style="font-size:11px;font-weight:600;color:{{d.lc}}">{{d.l}}</span>+<span style="font-size:17px;font-weight:500;color:{{d.nc}}">{{d.n}}</span>+</div>+</sc-for>+</div>+<div style="display:flex;align-items:center;gap:7px;padding:22px 24px 12px"><span style="font-size:11px;color:oklch(0.82 0.12 220)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Releasing</span><span style="margin-left:auto;font-size:12px;color:#8f97ad">2 of 4 read</span></div>+<div style="display:flex;gap:14px;padding:0 20px;overflow:hidden">+<sc-for list="{{ relShelf }}" as="it" hint-placeholder-count="4">+<div style="width:98px;flex-shrink:0;display:flex;flex-direction:column;gap:7px">+<div style="width:98px;height:140px;border-radius:12px;position:relative;background:linear-gradient(155deg,{{it.c1}},{{it.c2}});opacity:{{it.op}};box-shadow:{{it.ring}};display:flex;align-items:flex-end;padding:8px;box-sizing:border-box;font-family:'Newsreader',Georgia,serif;font-weight:600;font-size:18px;color:rgba(255,255,255,.88)">+{{it.ini}}+<sc-if value="{{it.done}}" hint-placeholder-val="{{ true }}"><span style="position:absolute;top:7px;right:7px;width:24px;height:24px;border-radius:12px;background:rgba(10,14,30,.72);border:1px solid oklch(0.82 0.12 220 / .6);display:flex;align-items:center;justify-content:center;font-family:-apple-system,sans-serif;font-size:12px;font-weight:700;color:oklch(0.85 0.11 220)">✓</span></sc-if>+<sc-if value="{{it.due}}" hint-placeholder-val="{{ false }}"><span style="position:absolute;right:7px;bottom:7px;font-family:-apple-system,sans-serif;font-size:11px;font-weight:700;padding:3px 8px;border-radius:10px;background:rgba(10,14,30,.72);color:oklch(0.85 0.11 220)">{{it.sub}}</span></sc-if>+</div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:13.5px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden">{{it.t}}</div>+</div>+</sc-for>+</div>+<div style="display:flex;align-items:center;gap:7px;padding:22px 24px 10px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Catching up</span><span style="margin-left:auto;font-size:12px;color:#8f97ad">4 works · See all</span></div>+<div style="margin:0 16px;padding:0 12px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<sc-for list="{{ catch1b }}" as="c" hint-placeholder-count="3">+<div style="display:flex;gap:11px;align-items:center;padding:10px 0;border-top:1px solid {{c.sep}}">+<div style="width:36px;height:50px;flex-shrink:0;border-radius:7px;background:linear-gradient(155deg,{{c.c1}},{{c.c2}});box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:5px">+<span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{c.t}}</span>+<sc-if value="{{c.known}}" hint-placeholder-val="{{ true }}"><div style="display:flex;align-items:center;gap:6px"><div style="flex:1;height:4px;border-radius:2px;background:rgba(170,200,255,.12)"><div style="width:{{c.pct}};height:4px;border-radius:2px;background:oklch(0.82 0.12 220)"></div></div><span style="font-size:11.5px;color:#8f97ad">{{c.frac}}</span></div></sc-if>+<span style="font-size:12px;color:{{c.bc}};font-weight:600">{{c.behind}}</span>+</div>+<span style="flex-shrink:0;height:30px;padding:0 11px;border-radius:15px;display:flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.14)">{{c.next}} <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"><path d="M7 17L17 7M9 7h8v8"></path></svg></span>+</div>+</sc-for>+</div>+<div style="display:flex;align-items:center;gap:7px;padding:22px 24px 6px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Noted</span></div>+<div style="padding:0 20px 0 14px">+<sc-for list="{{ noted }}" as="n" hint-placeholder-count="3">+<div style="display:flex;gap:10px;position:relative;padding:6px 0 12px">+<div style="position:absolute;left:21px;top:0;bottom:0;width:1px;background:rgba(170,200,255,.14)"></div>+<div style="width:44px;flex-shrink:0;display:flex;flex-direction:column;align-items:center;padding-top:4px;position:relative"><div style="width:9px;height:9px;border-radius:5px;background:oklch(0.82 0.12 220);box-shadow:0 0 0 4px #0c0c1c"></div><div style="font-family:ui-monospace,Menlo,monospace;font-size:10.5px;color:#8f97ad;margin-top:5px;background:#0c0c1c">{{n.time}}</div></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:3px">+<div style="display:flex;gap:6px;align-items:baseline;min-width:0"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{n.t}}</span></div>+<div style="font-size:12px;color:oklch(0.85 0.11 220);white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{n.ch}}</div>+<div style="font-size:14px;color:#b6bdd1;line-height:1.45">{{n.note}}</div>+</div>+</div>+</sc-for>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7));display:flex"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg></span>Today</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>Releasing is a cover shelf.</b> Unread releases get a cyan ring and the chapter badge. Read ones fade back and get a ✓. You can see what's left tonight without reading anything.</li>+<li><b>Catching up is a progress card</b> with a one-tap button to the next chapter (opens the URL).</li>+<li><b>Noted uses the timeline from the work detail screen.</b> Notes show in full, since they're the main content.</li>+<li>The shelf scrolls sideways, so Releasing stays the same height whether you have 2 releases or 12.</li>+</ul>+</div>++<div class="dv-opt" id="1c">+<div class="dv-olabel"><a class="dv-oid" href="#1c">1c</a>Tonight's sky <em>the week drawn as an asterism</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="1c Today sky" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1.5px 1.5px at 22% 48%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 40% 84%,rgba(255,255,255,.45),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;align-items:center;justify-content:space-between;padding:4px 20px 0"><span style="font-size:11.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#8f97ad">‹ 21–27 Sep ›</span><div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="3"></circle><circle cx="12" cy="12" r="8" stroke-dasharray="3 2.2"></circle></svg></div></div>+<svg width="390" height="104" viewBox="0 0 390 104" style="display:block;margin-top:2px">+<path d="M34 62 L86 40 L138 54" stroke="rgba(170,200,255,.5)" stroke-width="1" fill="none"></path>+<path d="M138 54 L190 30 L242 50 L294 36 L346 60" stroke="rgba(170,200,255,.22)" stroke-width="1" stroke-dasharray="3 4" fill="none"></path>+<circle cx="34" cy="62" r="3.6" fill="#dfe6ff"></circle>+<circle cx="86" cy="40" r="4.6" fill="#dfe6ff"></circle>+<circle cx="138" cy="54" r="22" fill="oklch(0.82 0.12 220 / .12)"></circle>+<path d="M138 40 L141.8 50.2 L152 54 L141.8 57.8 L138 68 L134.2 57.8 L124 54 L134.2 50.2 Z" fill="oklch(0.85 0.11 220)"></path>+<circle cx="190" cy="30" r="3.4" fill="none" stroke="oklch(0.82 0.12 305)" stroke-width="1.3"></circle>+<circle cx="242" cy="50" r="2.8" fill="none" stroke="oklch(0.82 0.12 305)" stroke-width="1.3"></circle>+<circle cx="294" cy="36" r="2.8" fill="none" stroke="oklch(0.82 0.12 305)" stroke-width="1.3"></circle>+<circle cx="346" cy="60" r="3.4" fill="none" stroke="oklch(0.82 0.12 305)" stroke-width="1.3"></circle>+<g font-family="-apple-system,sans-serif" font-size="11" font-weight="600" fill="#8f97ad" text-anchor="middle"><text x="34" y="96">M 21</text><text x="86" y="96">T 22</text><text x="138" y="96" fill="oklch(0.85 0.11 220)">W 23</text><text x="190" y="96">T 24</text><text x="242" y="96">F 25</text><text x="294" y="96">S 26</text><text x="346" y="96">S 27</text></g>+</svg>+<div style="padding:10px 22px 0;display:flex;align-items:baseline;justify-content:space-between"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:28px;letter-spacing:-.01em">Wednesday</span><span style="font-size:12.5px;color:#8f97ad">4 notes · 1 still due</span></div>+<svg width="390" height="120" viewBox="0 0 390 120" style="display:block;margin-top:4px">+<path d="M30 108 Q195 -92 360 108" fill="none" stroke="rgba(170,200,255,.16)" stroke-dasharray="2 4"></path>+<path d="M0 108 H390" stroke="rgba(170,200,255,.22)"></path>+<g font-family="ui-monospace,Menlo,monospace" font-size="10" fill="#6d7590" text-anchor="middle"><text x="112" y="119">06</text><text x="195" y="119">12</text><text x="278" y="119">18</text></g>+<circle cx="142" cy="19" r="3.5" fill="#dfe6ff"></circle>+<circle cx="204" cy="9" r="3" fill="#dfe6ff"></circle>+<circle cx="320" cy="66" r="4.2" fill="#dfe6ff"></circle>+<circle cx="354" cy="98" r="11" fill="oklch(0.82 0.12 220 / .16)"></circle>+<circle cx="354" cy="98" r="4.8" fill="oklch(0.85 0.11 220)"></circle>+<g font-family="-apple-system,sans-serif" font-size="10.5" fill="#b6bdd1" text-anchor="end"><text x="136" y="23">Wandering Inn</text><text x="198" y="13" text-anchor="end">System Change</text><text x="314" y="70">Illusion Hunter</text><text x="342" y="92" fill="oklch(0.85 0.11 220)">Countdown · now</text></g>+</svg>+<div style="padding:12px 16px 0;display:flex;flex-direction:column;gap:2px">+<sc-for list="{{ list1c }}" as="r" hint-placeholder-count="5">+<div style="display:flex;align-items:center;gap:12px;padding:7px 6px">+<span style="width:14px;text-align:center;font-size:12px;color:{{r.icC}}">{{r.ic}}</span>+<div style="width:30px;height:42px;flex-shrink:0;border-radius:6px;background:linear-gradient(155deg,{{r.c1}},{{r.c2}});opacity:{{r.op}}"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:1px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.t}}</span><span style="font-size:12.5px;color:{{r.subC}};white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.sub}}</span></div>+<span style="font-family:ui-monospace,Menlo,monospace;font-size:11px;color:{{r.timeC}}">{{r.time}}</span>+</div>+</sc-for>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7));display:flex"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg></span>Today</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>The week is an asterism.</b> Past days are solid stars sized by how many notes you wrote. Future days are hollow violet stars for scheduled releases. Today is the ✦. Tap a star to change the day.</li>+<li><b>The day is an arc from 00 to 24.</b> Each note sits at the time you wrote it. You get a sense of your reading rhythm, and releases still due show as hollow ○ rows in the list.</li>+<li>The list below is one time-ordered list (Releasing and Noted merged), so no work appears twice.</li>+<li>Risk: the arc is decoration unless people actually read by time of day. Tapping a star should scroll the list.</li>+</ul>+</div>++</div>+<p class="dv-next">Try next: "<a class="dv-oid" href="#1a">1a</a> but with <a class="dv-oid" href="#1b">1b</a>'s release shelf" · "put the asterism week from <a class="dv-oid" href="#1c">1c</a> on <a class="dv-oid" href="#1a">1a</a>" · "show 1a in light mode"</p>+</section>+++<section class="dv-turn" id="t2">+<div class="dv-thd"><a class="dv-tid" href="#t2">2</a><span class="dv-tname">Works</span></div>+<p class="dv-intro">Right now there's one menu with nine inline pickers (sort, group-by-series, type, tag, site, series, creator, work status, reading status, release days). It treats "what am I catching up on?" the same as "which works are tagged litrpg on Tapas?" The first you ask every day, the second almost never. Every option below splits the two. The daily statuses become a <b style="color:#e9ecf5">place you go</b>: Reading, Catching up, To read, On hiatus, plus Series. The rare filters move into <b style="color:#e9ecf5">search tokens</b> (see the inset under <a class="dv-oid" href="#2a">2a</a>). They go from simplest to build (<a class="dv-oid" href="#2a">2a</a>) to most unusual (<a class="dv-oid" href="#2e">2e</a>). <a class="dv-oid" href="#2d">2d</a> is the series page any of them can link to.</p>+<div class="dv-opts">++<div class="dv-opt" id="2a">+<div class="dv-olabel"><a class="dv-oid" href="#2a">2a</a>Scope chips <em>one row replaces the menu</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="2a Works chips" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1.5px 1.5px at 22% 48%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 40% 84%,rgba(255,255,255,.45),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;justify-content:flex-end;gap:8px;padding:2px 16px 0">+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4v16M3 16l4 4 4-4M17 20V4M13 8l4-4 4 4"></path></svg></div>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg></div>+</div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:33px;letter-spacing:-.01em;padding:2px 20px 12px">Works</div>+<div style="margin:0 16px;height:38px;border-radius:19px;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.06);display:flex;align-items:center;gap:8px;padding:0 13px;color:#8f97ad;font-size:15px"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-4-4"></path></svg>Search, or type tag: site: …</div>+<div style="display:flex;gap:8px;padding:12px 16px 0;overflow:hidden">+<sc-for list="{{ chips2a }}" as="c" hint-placeholder-count="5">+<div style="flex-shrink:0;height:34px;padding:0 13px;border-radius:17px;display:flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600;background:{{c.bg}};border:1px solid {{c.bd}};color:{{c.fc}};box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">{{c.l}}<span style="font-size:11.5px;font-weight:700;opacity:.7">{{c.n}}</span></div>+</sc-for>+</div>+<div style="display:flex;justify-content:space-between;padding:14px 22px 8px;font-size:12px;color:#8f97ad"><span>4 works</span><span>Most behind first ⌄</span></div>+<div style="display:flex;flex-direction:column;gap:9px;padding:0 16px">+<sc-for list="{{ rows2a }}" as="r" hint-placeholder-count="4">+<div style="display:flex;align-items:center;gap:12px;padding:9px 12px 9px 9px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:44px;height:62px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,{{r.c1}},{{r.c2}});display:flex;align-items:flex-end;padding:4px 5px;box-sizing:border-box;font-family:'Newsreader',Georgia,serif;font-weight:600;font-size:12px;color:rgba(255,255,255,.9);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)">{{r.ini}}</div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:5px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.t}}</div>+<div style="display:flex;align-items:center;gap:6px"><span style="font-size:12px;color:#8f97ad">{{r.site}}</span><span style="font-size:10.5px;font-weight:650;color:oklch(0.85 0.11 305);background:oklch(0.82 0.12 305 / .12);border:1px solid oklch(0.82 0.12 305 / .35);border-radius:9px;padding:1px 7px">{{r.ty}}</span></div>+<div style="font-size:12.5px;color:{{r.bc}};font-weight:600">{{r.behind}}</div>+</div>+<span style="font-size:11px;color:oklch(0.85 0.11 220);font-weight:700;background:oklch(0.82 0.12 220 / .12);padding:3px 9px;border-radius:12px">{{r.count}}</span>+</div>+</sc-for>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<div style="width:390px;border-radius:22px;padding:14px;box-sizing:border-box;background:linear-gradient(#141228,#0a0b16);border:1px solid rgba(170,200,255,.14);display:flex;flex-direction:column;gap:10px">+<div style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Inset · search with tokens</div>+<div style="height:38px;border-radius:19px;background:rgba(150,180,255,.07);border:1px solid oklch(0.82 0.12 220 / .45);display:flex;align-items:center;gap:6px;padding:0 6px 0 13px;font-size:15px;color:#e9ecf5"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#8f97ad" stroke-width="1.9" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-4-4"></path></svg><span style="font-size:13px;font-weight:600;color:oklch(0.85 0.11 305);background:oklch(0.82 0.12 305 / .14);border:1px solid oklch(0.82 0.12 305 / .4);border-radius:12px;padding:3px 9px">Tag: litrpg</span><span style="font-size:13px;font-weight:600;color:oklch(0.85 0.11 305);background:oklch(0.82 0.12 305 / .14);border:1px solid oklch(0.82 0.12 305 / .4);border-radius:12px;padding:3px 9px">Site: Royal Road</span><span style="width:1.5px;height:18px;background:oklch(0.82 0.12 220)"></span></div>+<div style="border-radius:16px;background:rgba(150,180,255,.05);padding:0 12px">+<sc-for list="{{ tokens2a }}" as="k" hint-placeholder-count="5">+<div style="display:flex;align-items:center;gap:10px;height:40px;border-top:1px solid {{k.sep}};font-size:14px"><span style="width:62px;font-weight:600">{{k.k}}</span><span style="flex:1;color:#8f97ad;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{k.v}}</span><span style="color:#8f97ad">›</span></div>+</sc-for>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>The easiest one to build.</b> A horizontal row of mutually exclusive scopes (a <code>ScrollView</code> of toggles) replaces the filter menu. The last scope you picked is remembered.</li>+<li><b>"Series" is a scope</b> that shows the grouped-by-series list, so the Group-by-series toggle can go.</li>+<li><b>Sorting depends on the scope.</b> Catching up sorts by most behind, To read by oldest added, On hiatus by longest paused. The ↕ button only overrides that.</li>+<li><b>Rare filters become search tokens</b> (<code>.searchable(tokens:)</code>). You can combine them with a scope, and the filter-pill row and the "no matching works" state go away.</li>+</ul>+</div>++<div class="dv-opt" id="2b">+<div class="dv-olabel"><a class="dv-oid" href="#2b">2b</a>Library home <em>like the Library tab in Music or Books</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="2b Works library home" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1.5px 1.5px at 22% 48%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 40% 84%,rgba(255,255,255,.45),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;justify-content:flex-end;gap:8px;padding:2px 16px 0">+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg></div>+</div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:33px;letter-spacing:-.01em;padding:2px 20px 12px">Works</div>+<div style="margin:0 16px;height:38px;border-radius:19px;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.1);display:flex;align-items:center;gap:8px;padding:0 13px;color:#8f97ad;font-size:15px"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-4-4"></path></svg>Search 126 works</div>+<div style="display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px 16px 0">+<sc-for list="{{ tiles2b }}" as="t" hint-placeholder-count="4">+<div style="height:112px;box-sizing:border-box;padding:12px 12px 11px 14px;display:flex;flex-direction:column;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="display:flex;justify-content:space-between;align-items:flex-start">+<span style="font-size:28px;font-weight:700;color:{{t.c}};line-height:1;letter-spacing:-.02em">{{t.n}}</span>+<div style="display:flex;padding-left:7px"><sc-for list="{{t.covers}}" as="k" hint-placeholder-count="3"><div style="width:22px;height:31px;border-radius:4px;margin-left:-8px;background:linear-gradient(155deg,{{k.c1}},{{k.c2}});border:1.5px solid #11122a"></div></sc-for></div>+</div>+<div style="margin-top:auto;font-size:14.5px;font-weight:600">{{t.l}}</div>+<div style="font-size:11.5px;color:#8f97ad;margin-top:1px">{{t.sub}}</div>+</div>+</sc-for>+</div>+<div style="margin:12px 16px 0;padding:0 14px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<sc-for list="{{ list2b }}" as="i" hint-placeholder-count="5">+<div style="display:flex;align-items:center;gap:12px;height:46px;border-top:1px solid {{i.sep}}"><span style="width:20px;text-align:center;color:oklch(0.82 0.12 305);font-size:15px">{{i.ic}}</span><span style="flex:1;font-size:15px">{{i.l}}</span><span style="font-size:14px;color:#8f97ad">{{i.n}}</span><span style="color:#8f97ad;font-size:15px">›</span></div>+</sc-for>+</div>+<div style="display:flex;align-items:center;gap:7px;padding:18px 24px 8px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Recently noted</span></div>+<div style="display:flex;flex-direction:column;gap:8px;padding:0 16px">+<sc-for list="{{ recent2b }}" as="r" hint-placeholder-count="2">+<div style="display:flex;align-items:center;gap:12px;padding:8px 12px 8px 8px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:36px;height:50px;flex-shrink:0;border-radius:7px;background:linear-gradient(155deg,{{r.c1}},{{r.c2}})"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:3px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.t}}</span><span style="font-size:12.5px;color:#8f97ad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.sub}}</span></div>+</div>+</sc-for>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>Works becomes a hub, not a list.</b> Four tiles for the statuses you check daily, each with a count and a stat worth seeing ("83 chapters behind"). Everything else is one list below.</li>+<li><b>Each tile and row opens a plain list</b> that uses the search tokens from <a class="dv-oid" href="#2a">2a</a>. Series and Creators get proper screens (<a class="dv-oid" href="#2d">2d</a>) instead of sitting in toolbar buttons.</li>+<li>Unattached notes move out of the main list into "All works" (or Settings → Maintenance).</li>+<li>Costs one more tap to reach a list, but that pays off on iPad and Mac, where these same entries become the sidebar (<a class="dv-oid" href="#3a">3a</a>).</li>+</ul>+</div>++<div class="dv-opt" id="2c">+<div class="dv-olabel"><a class="dv-oid" href="#2c">2c</a>Stacked shelves <em>every group visible at once</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="2c Works shelves" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1.5px 1.5px at 22% 48%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 40% 84%,rgba(255,255,255,.45),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;align-items:center;padding:6px 16px 6px 20px;gap:8px">+<span style="flex:1;font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:33px;letter-spacing:-.01em">Works</span>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-4-4"></path></svg></div>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg></div>+</div>+<div style="display:flex;flex-direction:column;gap:20px;padding-top:6px">+<sc-for list="{{ shelves2c }}" as="s" hint-placeholder-count="2">+<div style="display:flex;flex-direction:column;gap:10px">+<div style="display:flex;align-items:center;gap:7px;padding:0 20px 0 24px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">{{s.l}}</span><span style="font-size:11px;color:oklch(0.85 0.11 220);font-weight:700;background:oklch(0.82 0.12 220 / .12);padding:1px 7px;border-radius:9px">{{s.n}}</span><span style="margin-left:auto;font-size:13.5px;color:oklch(0.85 0.11 220)">See all</span></div>+<div style="display:flex;gap:12px;padding:0 20px;overflow:hidden">+<sc-for list="{{s.items}}" as="it" hint-placeholder-count="4">+<div style="width:84px;flex-shrink:0;display:flex;flex-direction:column;gap:6px">+<div style="width:84px;height:118px;border-radius:10px;position:relative;background:linear-gradient(155deg,{{it.c1}},{{it.c2}});box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"><span style="position:absolute;left:5px;bottom:5px;font-size:10px;font-weight:700;padding:2px 6px;border-radius:8px;background:rgba(10,14,30,.74);color:{{it.bc}};white-space:nowrap">{{it.b}}</span></div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:12.5px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden">{{it.t}}</div>+</div>+</sc-for>+</div>+</div>+</sc-for>+<div style="display:flex;flex-direction:column;gap:10px">+<div style="display:flex;align-items:center;gap:7px;padding:0 20px 0 24px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Series</span><span style="font-size:11px;color:oklch(0.85 0.11 220);font-weight:700;background:oklch(0.82 0.12 220 / .12);padding:1px 7px;border-radius:9px">7</span><span style="margin-left:auto;font-size:13.5px;color:oklch(0.85 0.11 220)">See all</span></div>+<div style="display:flex;gap:18px;padding:0 20px;overflow:hidden">+<sc-for list="{{ series2c }}" as="s" hint-placeholder-count="3">+<div style="width:112px;flex-shrink:0;display:flex;flex-direction:column;gap:8px">+<div style="position:relative;height:108px">+<div style="position:absolute;left:4px;top:10px;width:64px;height:90px;border-radius:8px;background:linear-gradient(155deg,{{s.c.c1}},{{s.c.c2}});transform:rotate(-9deg);opacity:.75;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:44px;top:10px;width:64px;height:90px;border-radius:8px;background:linear-gradient(155deg,{{s.b.c1}},{{s.b.c2}});transform:rotate(9deg);opacity:.85;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:24px;top:4px;width:64px;height:92px;border-radius:8px;background:linear-gradient(155deg,{{s.a.c1}},{{s.a.c2}});border:1px solid rgba(10,12,24,.8);box-shadow:0 6px 16px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.25)"></div>+</div>+<div style="display:flex;flex-direction:column;gap:1px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:13px;line-height:1.2">{{s.name}}</span><span style="font-size:11px;color:#8f97ad">{{s.n}}</span></div>+</div>+</sc-for>+</div>+</div>+<div style="display:flex;align-items:center;gap:7px;padding:0 20px 0 24px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">On hiatus</span><span style="font-size:11px;color:#8f97ad;font-weight:700;background:rgba(150,180,255,.08);padding:1px 7px;border-radius:9px">3</span></div>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>One screen of cover shelves, one per status.</b> Each badge shows that group's key number: how far behind, when you added it, how long it's been paused.</li>+<li><b>Series shows as fanned stacks</b> that open <a class="dv-oid" href="#2d">2d</a>.</li>+<li>Uses covers well. Many of your works have real cover art, which the current list shrinks to a thumbnail.</li>+<li>Weak for "find that one work": search has to do that job. The full list is under "See all" or search.</li>+</ul>+</div>++<div class="dv-opt" id="2d">+<div class="dv-olabel"><a class="dv-oid" href="#2d">2d</a>Series page <em>opened from any of the options above</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="2d Series page" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1.5px 1.5px at 12% 9%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 68% 11%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 86% 27%,rgba(255,255,255,.55),transparent),radial-gradient(1.5px 1.5px at 22% 48%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 78% 63%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 40% 84%,rgba(255,255,255,.45),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;justify-content:space-between;padding:2px 16px 0">+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6 6 6"></path></svg></div>+<div style="width:36px;height:36px;border-radius:18px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="1.8"></circle><circle cx="12" cy="12" r="1.8"></circle><circle cx="19" cy="12" r="1.8"></circle></svg></div>+</div>+<div style="position:relative;height:112px;width:180px;margin:0 auto">+<div style="position:absolute;left:14px;top:14px;width:66px;height:92px;border-radius:9px;background:linear-gradient(155deg,#c98a5a,#4a2a1a);transform:rotate(-10deg);opacity:.7;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;right:14px;top:14px;width:66px;height:92px;border-radius:9px;background:linear-gradient(155deg,#6a8fe0,#2a3570);transform:rotate(10deg);opacity:.85;border:1px solid rgba(10,12,24,.8)"></div>+<div style="position:absolute;left:54px;top:4px;width:72px;height:100px;border-radius:10px;background:linear-gradient(155deg,#5d86d8,#23335c);border:1px solid rgba(170,200,255,.25);box-shadow:0 0 30px rgba(93,134,216,.35),inset 0 1px 0 rgba(255,255,255,.25)"></div>+</div>+<div style="text-align:center;padding:10px 24px 0"><div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:27px;letter-spacing:-.01em;line-height:1.15">The Ironway Cycle</div><div style="font-size:13px;color:#8f97ad;margin-top:4px">4 works · M. Hale · Royal Road</div></div>+<div style="padding:14px 24px 0">+<div style="display:flex;gap:3px;height:6px"><div style="flex:1;border-radius:3px;background:oklch(0.82 0.12 220)"></div><div style="flex:1;border-radius:3px;background:oklch(0.82 0.12 220 / .45)"></div><div style="flex:1;border-radius:3px;background:rgba(170,200,255,.14)"></div><div style="flex:1;border-radius:3px;background:rgba(170,200,255,.14)"></div></div>+<div style="display:flex;justify-content:space-between;font-size:11.5px;color:#8f97ad;margin-top:6px"><span>1 finished · 1 reading</span><span>2 to read</span></div>+</div>+<div style="margin:16px 16px 0;padding:12px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:22px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);display:flex;flex-direction:column;gap:12px">+<div style="display:flex;gap:12px;align-items:center">+<div style="width:44px;height:62px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,#6a8fe0,#2a3570);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:3px"><span style="font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Next up · Book 2</span><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:17px">Beacon Lines</span><span style="font-size:12.5px;color:#8f97ad">Last noted Ch 211 · 3 days ago</span></div>+</div>+<div style="height:42px;border-radius:21px;display:flex;align-items:center;justify-content:center;gap:8px;background:linear-gradient(100deg,oklch(0.72 0.13 220),oklch(0.68 0.14 305));color:#fff;font-weight:700;font-size:14.5px;box-shadow:0 2px 26px oklch(0.7 0.13 262 / .5),inset 0 1px 0 rgba(255,255,255,.3)">Continue at Ch 212 <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round"><path d="M7 17L17 7M9 7h8v8"></path></svg></div>+</div>+<div style="display:flex;align-items:center;gap:7px;padding:20px 24px 8px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Reading order</span><span style="margin-left:auto;font-size:13px;color:oklch(0.85 0.11 220)">Edit</span></div>+<div style="display:flex;flex-direction:column;gap:2px;padding:0 16px">+<sc-for list="{{ order2d }}" as="o" hint-placeholder-count="4">+<div style="display:flex;align-items:center;gap:12px;padding:6px 6px">+<span style="width:30px;text-align:right;font-family:'Newsreader',Georgia,serif;font-weight:500;font-size:22px;color:#6d7590">{{o.pos}}</span>+<div style="width:34px;height:48px;flex-shrink:0;border-radius:6px;background:linear-gradient(155deg,{{o.c1}},{{o.c2}});opacity:{{o.op}}"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:2px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{o.t}}</span><span style="font-size:12.5px;color:{{o.stC}}"><span style="color:{{o.icC}}">{{o.ic}}</span> {{o.st}}</span></div>+</div>+</sc-for>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>The page answers "where am I in this series?"</b> A four-segment bar shows progress. Next up is the first work that isn't finished, and it gets the screen's one primary button.</li>+<li><b>Positions are the row's leading number</b>, 2.5 included, so interludes and side stories stay in reading order without extra labels.</li>+<li>Status is written out on each row ("Reading · last noted Ch 211"), not only shown as a glyph.</li>+<li>Series is a group of works, not a work. It gets no notes of its own and links back to each work.</li>+</ul>+</div>++<div class="dv-opt" id="2e">+<div class="dv-olabel"><a class="dv-oid" href="#2e">2e</a>Star chart <em>the library as a sky</em></div>+<div class="dv-card" style="border-radius:44px">+<div data-screen-label="2e Works star chart" style="width:390px;height:844px;position:relative;overflow:hidden;border-radius:44px;background:radial-gradient(1px 1px at 12% 9%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 68% 91%,rgba(255,255,255,.4),transparent),radial-gradient(ellipse 80% 45% at 90% -8%,oklch(0.5 0.11 305 / .42),transparent),radial-gradient(ellipse 80% 45% at 0% 108%,oklch(0.5 0.11 220 / .34),transparent),linear-gradient(#141228,#070814);color:#e9ecf5;font-size:15px;line-height:1.35">+<div style="height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 30px 0 44px;box-sizing:border-box;font-weight:600;font-size:16px"><span>23:50</span><svg width="68" height="12" viewBox="0 0 68 12"><rect x="0" y="8" width="3" height="4" rx="1" fill="#fff"></rect><rect x="5" y="6" width="3" height="6" rx="1" fill="#fff"></rect><rect x="10" y="3" width="3" height="9" rx="1" fill="#fff"></rect><rect x="15" y="0" width="3" height="12" rx="1" fill="#fff"></rect><rect x="40" y=".5" width="24" height="11" rx="3.5" fill="none" stroke="#fff" stroke-opacity=".5"></rect><rect x="42" y="2.5" width="13" height="7" rx="2" fill="#fff"></rect></svg></div>+<div style="display:flex;align-items:center;padding:6px 16px 0 20px;gap:8px">+<span style="flex:1;font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:33px;letter-spacing:-.01em">Works</span>+<div style="display:flex;height:34px;padding:3px;border-radius:17px;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.14);box-sizing:border-box"><div style="display:flex;align-items:center;padding:0 13px;font-size:13px;font-weight:600;color:#8f97ad">List</div><div style="display:flex;align-items:center;padding:0 13px;border-radius:14px;font-size:13px;font-weight:600;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .15);border:1px solid oklch(0.82 0.12 220 / .4)">Sky</div></div>+</div>+<svg width="390" height="560" viewBox="0 0 390 560" style="position:absolute;left:0;top:108px">+<defs>+<radialGradient id="au1"><stop offset="0" stop-color="oklch(0.6 0.12 220)" stop-opacity=".22"></stop><stop offset="1" stop-color="oklch(0.6 0.12 220)" stop-opacity="0"></stop></radialGradient>+<radialGradient id="au2"><stop offset="0" stop-color="oklch(0.6 0.12 305)" stop-opacity=".18"></stop><stop offset="1" stop-color="oklch(0.6 0.12 305)" stop-opacity="0"></stop></radialGradient>+</defs>+<ellipse cx="88" cy="100" rx="90" ry="70" fill="url(#au1)"></ellipse>+<ellipse cx="210" cy="270" rx="130" ry="100" fill="url(#au2)"></ellipse>+<g font-family="-apple-system,sans-serif" font-size="10" font-weight="700" letter-spacing="1.4" fill="#8f97ad">+<text x="22" y="34">CATCHING UP · 4</text><text x="150" y="176">READING · 38</text><text x="22" y="410">TO READ · 12</text><text x="276" y="34" fill="#5d6480">ON HIATUS · 3</text><text x="268" y="552" fill="#5d6480">FINISHED · 54</text>+</g>+<path d="M322 486 L262 384 L190 432 L120 474" stroke="oklch(0.82 0.12 305 / .5)" stroke-width="1" fill="none"></path>+<text x="152" y="500" font-family="Newsreader,Georgia,serif" font-style="italic" font-size="13" fill="oklch(0.85 0.11 305)">The Ironway Cycle</text>+<path d="M180 240 L238 286" stroke="oklch(0.82 0.12 305 / .35)" stroke-width="1" stroke-dasharray="3 3" fill="none"></path>+<circle cx="70" cy="90" r="14" fill="oklch(0.82 0.12 220 / .18)"></circle><circle cx="70" cy="90" r="5.5" fill="oklch(0.88 0.09 220)"></circle>+<circle cx="120" cy="70" r="4" fill="#dfe6ff"></circle><circle cx="104" cy="132" r="3.5" fill="#dfe6ff" opacity=".85"></circle><circle cx="46" cy="142" r="3" fill="#dfe6ff" opacity=".8"></circle>+<circle cx="180" cy="240" r="12" fill="rgba(223,230,255,.12)"></circle><circle cx="180" cy="240" r="6" fill="#eef2ff"></circle>+<circle cx="238" cy="286" r="20" fill="none" stroke="oklch(0.82 0.12 220 / .7)" stroke-width="1.3"></circle><circle cx="238" cy="286" r="6.5" fill="#eef2ff"></circle>+<circle cx="205" cy="332" r="4" fill="#dfe6ff" opacity=".8"></circle><circle cx="268" cy="224" r="3.5" fill="#dfe6ff" opacity=".7"></circle><circle cx="150" cy="300" r="3.5" fill="#dfe6ff" opacity=".6"></circle><circle cx="296" cy="322" r="3" fill="#dfe6ff" opacity=".55"></circle><circle cx="128" cy="252" r="3" fill="#dfe6ff" opacity=".6"></circle><circle cx="226" cy="200" r="2.5" fill="#dfe6ff" opacity=".5"></circle>+<circle cx="262" cy="384" r="5" fill="#dfe6ff"></circle><circle cx="190" cy="432" r="3" fill="none" stroke="#dfe6ff" stroke-width="1.2" opacity=".7"></circle><circle cx="120" cy="474" r="3.5" fill="none" stroke="#dfe6ff" stroke-width="1.2" opacity=".7"></circle><circle cx="322" cy="486" r="4" fill="#dfe6ff" opacity=".45"></circle>+<circle cx="50" cy="444" r="2.5" fill="none" stroke="#dfe6ff" stroke-width="1.1" opacity=".6"></circle><circle cx="80" cy="506" r="2.5" fill="none" stroke="#dfe6ff" stroke-width="1.1" opacity=".5"></circle><circle cx="34" cy="504" r="2" fill="none" stroke="#dfe6ff" stroke-width="1.1" opacity=".5"></circle>+<circle cx="336" cy="80" r="3" fill="#dfe6ff" opacity=".35"></circle><circle cx="360" cy="132" r="2.5" fill="#dfe6ff" opacity=".3"></circle><circle cx="306" cy="118" r="2.5" fill="#dfe6ff" opacity=".3"></circle>+<circle cx="352" cy="436" r="2.5" fill="#dfe6ff" opacity=".35"></circle><circle cx="366" cy="506" r="2" fill="#dfe6ff" opacity=".3"></circle><circle cx="302" cy="530" r="2" fill="#dfe6ff" opacity=".3"></circle>+<g font-family="-apple-system,sans-serif" font-size="10.5" fill="#b6bdd1"><text x="80" y="94">Countdown</text><text x="190" y="236">Illusion Hunter</text><text x="270" y="388">Beacon Lines</text></g>+</svg>+<div style="position:absolute;left:16px;right:16px;bottom:100px;display:flex;align-items:center;gap:12px;padding:10px 12px 10px 10px;background:rgba(16,22,42,.72);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.22);border-radius:22px;box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 0 40px oklch(0.6 0.12 260 / .14)">+<div style="width:40px;height:56px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,#a08a7a,#3c2f4a)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:3px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">System Change (System Universe)</span><span style="font-size:12.5px;color:#8f97ad">Reading · 212 notes · Ch 687 today</span></div>+<span style="color:#8f97ad;font-size:18px">›</span>+</div>+<div style="position:absolute;left:44px;right:44px;bottom:22px;height:62px;border-radius:31px;background:rgba(18,24,44,.62);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 30px rgba(0,0,0,.45);display:flex;align-items:center;padding:4px;box-sizing:border-box">+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="3"></rect><path d="M3 10h18M8 3v4M16 3v4"></path></svg>Today</div>+<div style="flex:1;height:52px;border-radius:26px;background:rgba(150,180,255,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:oklch(0.82 0.12 220);font-size:10.5px;font-weight:600"><span style="font-size:19px;line-height:20px;filter:drop-shadow(0 0 8px oklch(0.82 0.12 220 / .7))">✦</span>Works</div>+<div style="flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#c9cfdd;font-size:10.5px;font-weight:600"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><rect x="3" y="11" width="5" height="10" rx="1.5"></rect><rect x="9.5" y="5" width="5" height="16" rx="1.5"></rect><rect x="16" y="8" width="5" height="13" rx="1.5"></rect></svg>Stats</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:370px">+<li><b>Every work is a star.</b> Its size is how many notes it has, its brightness is how recently you noted it, and it's hollow if you haven't started it. Reading status decides which part of the sky it sits in, so hiatus and finished works drift to the dim edges.</li>+<li><b>Series are constellation lines</b> with their names in italic serif. A series that crosses statuses (Ironway: finished → reading → to read) shows that as a path.</li>+<li>Tap a star to show the glass peek card, pinch to zoom. List is always one tap away. This is a "Sky" view, not a replacement for the list.</li>+<li>Honest take: great for a sense of the whole library, poor for finding a specific work. Could be a Stats feature more than a Works view.</li>+</ul>+</div>++</div>+<p class="dv-next">Try next: "combine <a class="dv-oid" href="#2a">2a</a>'s chips with <a class="dv-oid" href="#2c">2c</a>'s shelves on the All scope" · "<a class="dv-oid" href="#2b">2b</a> tiles, but open straight into <a class="dv-oid" href="#2a">2a</a> with the scope set" · "move <a class="dv-oid" href="#2e">2e</a> into Stats"</p>+</section>++<section class="dv-turn" id="t3">+<div class="dv-thd"><a class="dv-tid" href="#t3">3</a><span class="dv-tname">iPad & Mac</span></div>+<div style="display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;max-width:1180px;margin:0 0 32px">+<div style="padding:20px 22px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)">+<div style="font:700 11px -apple-system,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad;margin-bottom:10px">What's wrong with sidebar → list → detail</div>+<ul class="dv-note" style="font-size:13px">+<li><b>The sidebar holds three items and Settings.</b> It's a tab bar that costs 232 pt of width. It navigates the app but none of your content.</li>+<li><b>Today is a dashboard, not a list.</b> In the list column it's a 360 pt phone screen, and the detail column shows one note at a time. The week strip, the thing that makes Today work, gets the least room.</li>+<li><b>The list column is the wrong width for everything.</b> Too narrow for Today, too wide for a list of titles. The detail column is left with ~780 pt on a 1440 Mac and ~420 pt on iPad portrait.</li>+<li><b>Relationships get pushed out of view.</b> Going from work to series to creator pushes inside the detail column, so each step hides the one before.</li>+<li><b>The Works filters are still hidden in a menu</b>, even though a sidebar is exactly where they belong.</li>+</ul>+</div>+<div style="padding:20px 22px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)">+<div style="font:700 11px -apple-system,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad;margin-bottom:10px">The options, simplest first</div>+<ul class="dv-note" style="font-size:13px">+<li><a class="dv-oid" href="#3a">3a</a> <b>The sidebar holds your library.</b> Same three panes, but the sidebar lists the shelves from <a class="dv-oid" href="#2b">2b</a>, so it's worth its width. Least new work: <code>TabView</code> + <code>.sidebarAdaptable</code> with sections.</li>+<li><a class="dv-oid" href="#3b">3b</a> <b>Tabs at the top, Today full width.</b> Drop the sidebar. Today and Stats get the whole window as dashboards. Only Works uses list + detail.</li>+<li><a class="dv-oid" href="#3c">3c</a> <b>Week board + inspector.</b> On a big screen Today becomes the whole week as columns. Details open in an inspector you can hide.</li>+<li><a class="dv-oid" href="#3d">3d</a> <b>Sliding panes.</b> Every link opens a new pane to the right, and older panes fold into narrow strips. You keep the whole path from work to series to creator on screen.</li>+<li><a class="dv-oid" href="#3e">3e</a> <b>Mac reading companion.</b> A floating panel next to Safari that sees the chapter you're reading. On the Mac, capturing notes is the main job, not browsing.</li>+</ul>+</div>+</div>+<div class="dv-opts">++<div class="dv-opt" id="3a">+<div class="dv-olabel"><a class="dv-oid" href="#3a">3a</a>Library sidebar <em>Mac · the sidebar lists your library</em></div>+<div class="dv-card" style="border-radius:12px">+<div data-screen-label="3a Mac library sidebar" style="width:1280px;height:800px;position:relative;overflow:hidden;border-radius:12px;background:radial-gradient(1.5px 1.5px at 18% 12%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 72% 8%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 44% 22%,rgba(255,255,255,.5),transparent),radial-gradient(1.5px 1.5px at 88% 30%,rgba(255,255,255,.6),transparent),radial-gradient(1px 1px at 10% 62%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 60% 75%,rgba(255,255,255,.4),transparent),radial-gradient(ellipse 60% 45% at 85% -10%,oklch(0.5 0.11 305 / .36),transparent),radial-gradient(ellipse 55% 40% at 8% 110%,oklch(0.5 0.11 220 / .31),transparent),linear-gradient(#0e0d20,#05060d);color:#e9ecf5;font-size:13px;line-height:1.35">+<div style="position:absolute;inset:0;display:flex;padding:8px;box-sizing:border-box">+<div style="width:236px;flex-shrink:0;display:flex;flex-direction:column;padding:14px 10px 12px;box-sizing:border-box;background:rgba(16,22,42,.55);backdrop-filter:blur(36px) saturate(1.9);-webkit-backdrop-filter:blur(36px) saturate(1.9);border:1px solid rgba(170,200,255,.16);border-radius:16px;box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 10px 40px rgba(0,0,0,.35)">+<div style="display:flex;gap:8px;padding:2px 10px 12px"><div style="width:12px;height:12px;border-radius:6px;background:#ff5f57"></div><div style="width:12px;height:12px;border-radius:6px;background:#febc2e"></div><div style="width:12px;height:12px;border-radius:6px;background:#28c840"></div></div>+<sc-for list="{{ side3a }}" as="s" hint-placeholder-count="12">+<sc-if value="{{s.head}}" hint-placeholder-val="{{ false }}"><div style="padding:14px 10px 5px;font-size:11px;font-weight:700;color:#6d7590;letter-spacing:.04em">{{s.l}}</div></sc-if>+<sc-if value="{{s.item}}" hint-placeholder-val="{{ true }}"><div style="display:flex;align-items:center;gap:9px;height:29px;padding:0 10px 0 {{s.pl}};border-radius:8px;background:{{s.bg}};color:{{s.fc}};font-size:13px"><span style="width:16px;text-align:center;color:{{s.icc}}">{{s.ic}}</span><span style="flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{s.l}}</span><span style="font-size:11.5px;color:#8f97ad">{{s.n}}</span></div></sc-if>+</sc-for>+<div style="flex:1"></div>+<div style="display:flex;align-items:center;gap:9px;height:29px;padding:0 10px;font-size:13px"><span style="width:16px;text-align:center;color:#8f97ad">▥</span>Stats</div>+<div style="display:flex;align-items:center;gap:9px;height:29px;padding:0 10px;font-size:13px"><span style="width:16px;text-align:center;color:#8f97ad">⚙</span>Settings</div>+</div>+<div style="width:350px;flex-shrink:0;display:flex;flex-direction:column;padding:10px 16px 0;box-sizing:border-box">+<div style="display:flex;justify-content:flex-end;gap:8px;height:30px">+<div style="width:30px;height:30px;border-radius:15px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4v16M3 16l4 4 4-4M17 20V4M13 8l4-4 4 4"></path></svg></div>+<div style="width:30px;height:30px;border-radius:15px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg></div>+</div>+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:28px;letter-spacing:-.01em;padding:10px 4px 2px">Catching up</div>+<div style="font-size:12px;color:#8f97ad;padding:0 4px 12px">4 works · 83 chapters behind</div>+<div style="height:32px;border-radius:16px;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.1);display:flex;align-items:center;gap:8px;padding:0 12px;color:#8f97ad;font-size:13px;margin-bottom:12px"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-4-4"></path></svg>Search in Catching up</div>+<div style="display:flex;flex-direction:column;gap:8px">+<sc-for list="{{ rows3a }}" as="r" hint-placeholder-count="4">+<div style="display:flex;align-items:center;gap:11px;padding:9px 12px 9px 9px;background:{{r.bg}};border:1px solid {{r.bd}};border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:38px;height:54px;flex-shrink:0;border-radius:7px;background:linear-gradient(155deg,{{r.c1}},{{r.c2}});box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:4px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.t}}</div>+<div style="display:flex;align-items:center;gap:6px"><span style="font-size:11.5px;color:#8f97ad">{{r.site}}</span><span style="font-size:10px;font-weight:650;color:oklch(0.85 0.11 305);background:oklch(0.82 0.12 305 / .12);border:1px solid oklch(0.82 0.12 305 / .35);border-radius:8px;padding:0 6px">{{r.ty}}</span></div>+<div style="font-size:11.5px;color:{{r.bc}};font-weight:600">{{r.behind}}</div>+</div>+<span style="font-size:10.5px;color:oklch(0.85 0.11 220);font-weight:700;background:oklch(0.82 0.12 220 / .12);padding:3px 8px;border-radius:10px">{{r.count}}</span>+</div>+</sc-for>+</div>+</div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;padding:10px 24px 0 28px;box-sizing:border-box">+<div style="display:flex;justify-content:flex-end;gap:8px;height:30px">+<div style="width:30px;height:30px;border-radius:15px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20l4-1 11-11-3-3L5 16z"></path></svg></div>+<div style="width:30px;height:30px;border-radius:15px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="1.7"></circle><circle cx="12" cy="12" r="1.7"></circle><circle cx="19" cy="12" r="1.7"></circle></svg></div>+</div>+<div style="width:100%;max-width:640px;margin:0 auto;display:flex;flex-direction:column;padding-top:6px">+<div style="display:flex;gap:18px;align-items:flex-start">+<div style="width:62px;height:84px;border-radius:12px;flex-shrink:0;background:linear-gradient(155deg,#a7d6f2,#4a6fa8);border:1px solid rgba(170,200,255,.25);box-shadow:0 0 26px rgba(120,170,230,.3),inset 0 1px 0 rgba(255,255,255,.25)"></div>+<div style="min-width:0;flex:1;display:flex;flex-direction:column;gap:8px">+<div style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:26px;line-height:1.15">The Countdown of My Death is Spamming My Status Window</div>+<div style="display:flex;gap:6px;flex-wrap:wrap;align-items:center"><span style="font-size:11px;font-weight:650;color:oklch(0.85 0.11 305);background:oklch(0.82 0.12 305 / .12);border:1px solid oklch(0.82 0.12 305 / .35);border-radius:10px;padding:2px 9px">Webtoon</span><span style="font-size:11px;font-weight:650;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .12);border:1px solid oklch(0.82 0.12 220 / .35);border-radius:10px;padding:2px 9px">» Catching up</span><span style="font-size:11px;font-weight:650;color:#8f97ad;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:10px;padding:2px 9px">Wednesdays</span><span style="font-size:12px;color:#8f97ad">Webtoons · 26 notes</span></div>+</div>+</div>+<div style="margin-top:18px;padding:14px 16px;border-radius:18px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);box-shadow:inset 0 1px 0 rgba(255,255,255,.1);display:flex;align-items:center;gap:18px">+<div style="flex:1;display:flex;flex-direction:column;gap:8px"><div style="display:flex;justify-content:space-between;font-size:12.5px"><span>Episode 26 of 40</span><span style="color:oklch(0.85 0.11 220);font-weight:600">14 behind · 1 new this week</span></div><div style="height:5px;border-radius:3px;background:rgba(170,200,255,.12)"><div style="width:65%;height:5px;border-radius:3px;background:oklch(0.82 0.12 220)"></div></div></div>+<div style="height:38px;padding:0 18px;border-radius:19px;display:flex;align-items:center;gap:7px;background:linear-gradient(100deg,oklch(0.72 0.13 220),oklch(0.68 0.14 305));color:#fff;font-weight:700;font-size:13px;box-shadow:0 2px 26px oklch(0.7 0.13 262 / .5),inset 0 1px 0 rgba(255,255,255,.3);white-space:nowrap">Continue at Ep 27 <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round"><path d="M7 17L17 7M9 7h8v8"></path></svg></div>+</div>+<div style="display:flex;align-items:center;gap:7px;padding:24px 4px 8px"><span style="font-size:9px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Chapter notes</span></div>+<sc-for list="{{ spine3a }}" as="n" hint-placeholder-count="3">+<div style="display:flex;gap:12px;position:relative;padding:8px 0 14px">+<div style="position:absolute;left:21px;top:0;bottom:0;width:1px;background:rgba(170,200,255,.13)"></div>+<div style="width:44px;flex-shrink:0;display:flex;flex-direction:column;align-items:center;padding-top:5px;position:relative"><div style="width:10px;height:10px;border-radius:5px;background:oklch(0.82 0.12 220)"></div><div style="font-family:ui-monospace,Menlo,monospace;font-size:11px;color:#8f97ad;margin-top:6px;background:#080914">{{n.n}}</div></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:5px"><div style="display:flex;justify-content:space-between;gap:10px"><span style="font-size:13px;font-weight:600">{{n.t}}</span><span style="font-size:11px;color:#8f97ad">{{n.when}}</span></div><div style="font-size:14.5px;color:#b6bdd1;line-height:1.5">{{n.note}}</div></div>+</div>+</sc-for>+</div>+</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:1240px;columns:2;column-gap:40px">+<li><b>The sidebar holds the library, not the tabs.</b> Today at the top, then the shelves from <a class="dv-oid" href="#2b">2b</a>, then Series (expandable, one row per series) and Creators. Stats and Settings sit at the bottom.</li>+<li><b>This fixes Works too.</b> Choosing a shelf sets the list's scope, and the rare filters are search tokens as in <a class="dv-oid" href="#2a">2a</a>. The same model works on the phone, so it's one codebase.</li>+<li><b>Detail shows progress for the shelf you picked</b>: the Catching up shelf gets a progress card and a Continue button at the top of the work page.</li>+<li>Build: <code>TabView</code> with <code>TabSection</code>s and <code>.tabViewStyle(.sidebarAdaptable)</code> gives you this sidebar on iPad and Mac and a tab bar on the phone. Today still needs <a class="dv-oid" href="#3b">3b</a>'s full-width treatment when selected.</li>+</ul>+</div>++<div class="dv-opt" id="3b">+<div class="dv-olabel"><a class="dv-oid" href="#3b">3b</a>Top tabs + full-width Today <em>iPad landscape · only Works uses list + detail</em></div>+<div class="dv-card" style="border-radius:30px">+<div data-screen-label="3b iPad top tabs Today" style="width:1180px;height:820px;position:relative;overflow:hidden;border-radius:30px;background:radial-gradient(1.5px 1.5px at 18% 12%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 72% 8%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 44% 22%,rgba(255,255,255,.5),transparent),radial-gradient(1.5px 1.5px at 88% 30%,rgba(255,255,255,.6),transparent),radial-gradient(1px 1px at 10% 62%,rgba(255,255,255,.5),transparent),radial-gradient(1px 1px at 60% 75%,rgba(255,255,255,.4),transparent),radial-gradient(ellipse 60% 45% at 85% -10%,oklch(0.5 0.11 305 / .36),transparent),radial-gradient(ellipse 55% 40% at 8% 110%,oklch(0.5 0.11 220 / .31),transparent),linear-gradient(#0e0d20,#05060d);color:#e9ecf5;font-size:14px;line-height:1.35">+<div style="display:flex;justify-content:space-between;padding:12px 28px 0;font-size:13px;font-weight:600"><span>23:50 Wed 23 Sep</span><span style="letter-spacing:2px;font-size:11px">▂▄▆ ▭</span></div>+<div style="position:absolute;top:36px;left:50%;transform:translateX(-50%);height:44px;border-radius:22px;padding:4px;box-sizing:border-box;display:flex;gap:2px;background:rgba(18,24,44,.6);backdrop-filter:blur(30px) saturate(1.9);-webkit-backdrop-filter:blur(30px) saturate(1.9);border:1px solid rgba(170,200,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 8px 24px rgba(0,0,0,.35)">+<div style="display:flex;align-items:center;padding:0 18px;border-radius:18px;background:rgba(150,180,255,.14);color:oklch(0.85 0.11 220);font-weight:600;font-size:14px">Today</div>+<div style="display:flex;align-items:center;padding:0 18px;color:#c9cfdd;font-weight:600;font-size:14px">Works</div>+<div style="display:flex;align-items:center;padding:0 18px;color:#c9cfdd;font-weight:600;font-size:14px">Stats</div>+</div>+<div style="position:absolute;top:38px;right:28px;display:flex;gap:10px">+<div style="width:40px;height:40px;border-radius:20px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-4-4"></path></svg></div>+<div style="width:40px;height:40px;border-radius:20px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;color:#c9cfdd"><svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="3"></circle><circle cx="12" cy="12" r="8" stroke-dasharray="3 2.2"></circle></svg></div>+</div>+<div style="position:absolute;top:100px;left:36px;right:36px;display:flex;align-items:flex-end;justify-content:space-between">+<div style="display:flex;flex-direction:column;gap:4px"><span style="font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#8f97ad">21–27 Sep 2026</span><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:38px;letter-spacing:-.01em;line-height:1.05">Wednesday</span></div>+<div style="display:flex;align-items:center;gap:6px">+<span style="color:oklch(0.82 0.12 220);font-size:18px;padding:0 6px">‹</span>+<sc-for list="{{ weekA }}" as="d" hint-placeholder-count="7">+<div style="width:52px;padding:7px 0 8px;border-radius:14px;background:{{d.bg}};border:1px solid {{d.bd}};display:flex;flex-direction:column;align-items:center;gap:2px">+<span style="font-size:12px;font-weight:600;color:{{d.lc}}">{{d.l}}</span>+<span style="font-size:21px;font-weight:500;color:{{d.nc}}">{{d.n}}</span>+<div style="display:flex;gap:3px;height:5px"><sc-for list="{{d.marks}}" as="m" hint-placeholder-count="2"><span style="width:5px;height:5px;border-radius:3px;box-sizing:border-box;background:{{m.bg}};border:1.2px solid {{m.bd}}"></span></sc-for></div>+</div>+</sc-for>+<span style="color:oklch(0.82 0.12 220);font-size:18px;padding:0 6px">›</span>+</div>+</div>+<div style="position:absolute;top:212px;left:36px;right:36px;bottom:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr);gap:22px">+<div style="display:flex;flex-direction:column;gap:9px">+<div style="display:flex;align-items:center;gap:7px;padding:0 4px 2px"><span style="font-size:11px;color:oklch(0.82 0.12 220)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Releasing</span><span style="margin-left:auto;font-size:12px;color:#8f97ad">2 of 4 read</span></div>+<sc-for list="{{ relShelf }}" as="r" hint-placeholder-count="4">+<div style="display:flex;align-items:center;gap:12px;padding:9px 12px 9px 9px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:42px;height:58px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,{{r.c1}},{{r.c2}});opacity:{{r.op}};box-shadow:{{r.ring}}"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:4px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{r.t}}</span><span style="font-size:12.5px;color:#8f97ad">{{r.ty}} · {{r.sub}}</span></div>+<sc-if value="{{r.done}}" hint-placeholder-val="{{ true }}"><span style="width:24px;height:24px;border-radius:12px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .16);border:1.5px solid oklch(0.82 0.12 220 / .5);box-sizing:border-box">✓</span></sc-if>+<sc-if value="{{r.due}}" hint-placeholder-val="{{ false }}"><span style="width:24px;height:24px;border-radius:12px;flex-shrink:0;border:1.5px dashed rgba(170,200,255,.45);box-sizing:border-box"></span></sc-if>+</div>+</sc-for>+</div>+<div style="display:flex;flex-direction:column;gap:9px">+<div style="display:flex;align-items:center;gap:7px;padding:0 4px 2px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Catching up</span></div>+<sc-for list="{{ catch3b }}" as="c" hint-placeholder-count="3">+<div style="display:flex;align-items:center;gap:12px;padding:9px 14px 9px 9px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<div style="width:42px;height:58px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,{{c.c1}},{{c.c2}})"></div>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:6px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{c.t}}</span><span style="font-size:12px;color:#8f97ad">{{c.at}}</span><div style="height:4px;border-radius:2px;background:rgba(170,200,255,.12)"><div style="width:{{c.pct}};height:4px;border-radius:2px;background:oklch(0.82 0.12 220)"></div></div></div>+<div style="display:flex;flex-direction:column;align-items:flex-end"><span style="font-size:18px;font-weight:700;color:oklch(0.85 0.11 220);line-height:1.1">{{c.behind}}</span><span style="font-size:10.5px;color:#8f97ad">behind</span></div>+</div>+</sc-for>+</div>+<div style="display:flex;flex-direction:column;gap:9px;min-width:0">+<div style="display:flex;align-items:center;gap:7px;padding:0 4px 2px"><span style="font-size:11px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Noted</span><span style="margin-left:auto;font-size:12px;color:#8f97ad">4 notes</span></div>+<div style="padding:2px 16px;background:rgba(150,180,255,.055);border:1px solid rgba(170,200,255,.13);border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)">+<sc-for list="{{ noted }}" as="n" hint-placeholder-count="4">+<div style="display:flex;gap:14px;padding:12px 0;border-top:1px solid {{n.sep}}">+<span style="width:40px;flex-shrink:0;font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:#8f97ad;padding-top:3px">{{n.time}}</span>+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:3px">+<div style="display:flex;gap:8px;align-items:baseline;min-width:0"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{n.t}}</span></div>+<div style="font-size:12.5px;color:oklch(0.85 0.11 220)">{{n.ch}}</div>+<div style="font-size:14px;color:#b6bdd1;line-height:1.45">{{n.note}}</div>+</div>+</div>+</sc-for>+</div>+</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:1140px;columns:2;column-gap:40px">+<li><b>No permanent sidebar.</b> The iPadOS 26 floating tab bar sits at the top, and each tab chooses its own layout.</li>+<li><b>Today and Stats use the full width.</b> The week strip gets space, and the three sections sit side by side so nothing scrolls on a normal day. Tapping a row opens the detail as a sheet (iPad) or a push (Mac), then goes back to the board.</li>+<li><b>Only Works uses list + detail</b>, the one screen where that fits. Its list uses <a class="dv-oid" href="#2a">2a</a>'s scope chips.</li>+<li>In portrait the three columns collapse to two: Releasing and Catching up share one, and Noted gets the other.</li>+</ul>+</div>++<div class="dv-opt" id="3c">+<div class="dv-olabel"><a class="dv-oid" href="#3c">3c</a>Week board + inspector <em>Mac · Today shows the whole week</em></div>+<div class="dv-card" style="border-radius:12px">+<div data-screen-label="3c Mac week board" style="width:1280px;height:800px;position:relative;overflow:hidden;border-radius:12px;background:radial-gradient(1.5px 1.5px at 18% 12%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 72% 8%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 44% 22%,rgba(255,255,255,.5),transparent),radial-gradient(1.5px 1.5px at 88% 30%,rgba(255,255,255,.6),transparent),radial-gradient(1px 1px at 10% 62%,rgba(255,255,255,.5),transparent),radial-gradient(ellipse 60% 45% at 85% -10%,oklch(0.5 0.11 305 / .36),transparent),radial-gradient(ellipse 55% 40% at 8% 110%,oklch(0.5 0.11 220 / .31),transparent),linear-gradient(#0e0d20,#05060d);color:#e9ecf5;font-size:13px;line-height:1.35">+<div style="position:absolute;top:0;left:0;right:0;height:52px;display:flex;align-items:center;gap:18px;padding:0 16px">+<div style="display:flex;gap:8px"><div style="width:12px;height:12px;border-radius:6px;background:#ff5f57"></div><div style="width:12px;height:12px;border-radius:6px;background:#febc2e"></div><div style="width:12px;height:12px;border-radius:6px;background:#28c840"></div></div>+<div style="display:flex;height:30px;padding:3px;border-radius:15px;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.14);box-sizing:border-box"><div style="display:flex;align-items:center;padding:0 12px;border-radius:12px;font-size:12px;font-weight:600;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .15)">Today</div><div style="display:flex;align-items:center;padding:0 12px;font-size:12px;font-weight:600;color:#8f97ad">Works</div><div style="display:flex;align-items:center;padding:0 12px;font-size:12px;font-weight:600;color:#8f97ad">Stats</div></div>+<div style="flex:1;display:flex;justify-content:center;align-items:center;gap:14px"><span style="color:oklch(0.82 0.12 220);font-size:16px">‹</span><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:19px">21–27 September</span><span style="color:oklch(0.82 0.12 220);font-size:16px">›</span></div>+<div style="display:flex;height:30px;padding:3px;border-radius:15px;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.14);box-sizing:border-box"><div style="display:flex;align-items:center;padding:0 12px;font-size:12px;font-weight:600;color:#8f97ad">Day</div><div style="display:flex;align-items:center;padding:0 12px;border-radius:12px;font-size:12px;font-weight:600;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .15)">Week</div></div>+<div style="width:30px;height:30px;border-radius:15px;background:rgba(150,180,255,.08);border:1px solid rgba(170,200,255,.16);display:flex;align-items:center;justify-content:center;color:oklch(0.85 0.11 220)"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><rect x="3" y="5" width="18" height="14" rx="3"></rect><path d="M15 5v14"></path></svg></div>+</div>+<div style="position:absolute;top:60px;left:12px;right:344px;bottom:12px;display:flex;gap:8px">+<sc-for list="{{ board3c }}" as="day" hint-placeholder-count="7">+<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:7px;padding:8px 7px;border-radius:14px;background:{{day.bg}};border:1px solid {{day.bd}}">+<div style="display:flex;align-items:baseline;gap:6px;padding:0 3px 4px"><span style="font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8f97ad">{{day.d}}</span><span style="font-size:19px;font-weight:500;color:{{day.nc}}">{{day.n}}</span></div>+<sc-for list="{{day.cards}}" as="c" hint-placeholder-count="2">+<div style="padding:8px;border-radius:11px;background:{{c.bg}};border:1px {{c.bs}} {{c.bd}};opacity:{{c.op}};display:flex;flex-direction:column;gap:6px">+<div style="display:flex;gap:7px;align-items:flex-start"><div style="width:20px;height:28px;flex-shrink:0;border-radius:4px;background:linear-gradient(155deg,{{c.c1}},{{c.c2}})"></div><div style="min-width:0;display:flex;flex-direction:column;gap:2px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:12.5px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden">{{c.t}}</span><span style="font-size:11px;color:{{c.sc}}">{{c.s}}</span></div></div>+<sc-if value="{{c.hasX}}" hint-placeholder-val="{{ false }}"><div style="font-size:11.5px;color:#b6bdd1;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden">{{c.x}}</div></sc-if>+</div>+</sc-for>+</div>+</sc-for>+</div>+<div style="position:absolute;top:60px;right:12px;bottom:12px;width:320px;box-sizing:border-box;padding:18px;display:flex;flex-direction:column;gap:12px;background:rgba(16,22,42,.6);backdrop-filter:blur(36px) saturate(1.9);-webkit-backdrop-filter:blur(36px) saturate(1.9);border:1px solid rgba(170,200,255,.18);border-radius:16px;box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 0 40px oklch(0.6 0.12 260 / .14)">+<div style="display:flex;gap:12px;align-items:flex-start"><div style="width:46px;height:64px;flex-shrink:0;border-radius:9px;background:linear-gradient(155deg,#a7d6f2,#4a6fa8)"></div><div style="min-width:0;display:flex;flex-direction:column;gap:4px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:17px;line-height:1.2">The Countdown of My Death is Spamming My Status Window</span><span style="font-size:11.5px;color:#8f97ad">Webtoons · » 14 behind</span></div></div>+<div style="height:1px;background:rgba(170,200,255,.12)"></div>+<div style="display:flex;justify-content:space-between;align-items:baseline"><span style="font-size:13.5px;font-weight:600;color:oklch(0.85 0.11 220)">26. A Gift from the King</span><span style="font-size:11px;color:#8f97ad">Wed 23:33</span></div>+<div style="display:flex;gap:8px"><div style="width:44px;height:34px;border-radius:17px;display:flex;align-items:center;justify-content:center;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .15);border:1px solid oklch(0.82 0.12 220 / .55);box-shadow:0 0 16px oklch(0.82 0.12 220 / .25)">▲</div><div style="width:44px;height:34px;border-radius:17px;display:flex;align-items:center;justify-content:center;color:#8f97ad;background:rgba(150,180,255,.07)">▼</div></div>+<div style="font-size:14px;color:#b6bdd1;line-height:1.55">So the monitor is Gerhardt, and he can read the countdown too. That reframes the whole first season, and every "system message" joke from ep 3 onward is now a clue.</div>+<div style="flex:1"></div>+<div style="display:flex;gap:8px"><div style="flex:1;height:34px;border-radius:17px;display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:600;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.16)">Open chapter ↗</div><div style="flex:1;height:34px;border-radius:17px;display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:600;background:rgba(150,180,255,.07);border:1px solid rgba(170,200,255,.16)">Go to work</div></div>+</div>+</div>+</div>+<ul class="dv-note" style="width:1240px;columns:2;column-gap:40px">+<li><b>A calendar you read, not a list you scroll.</b> Seven day columns hold release cards (dimmed with ✓ once read), note cards with the first lines of the note, and dashed cards for releases still due later in the week.</li>+<li><b>The inspector replaces the detail column</b> (<code>.inspector</code> in SwiftUI). You can hide it, and it shows whatever card you selected. The board keeps the full width whenever you're not reading a note.</li>+<li><b>Day ↔ Week toggle</b>: Day falls back to <a class="dv-oid" href="#3b">3b</a>'s three sections. Tabs sit in the toolbar, which frees the sidebar's width.</li>+<li>Risk: busy days (10+ notes) need a "+6 more" card. Needs at least ~1100 pt of width, so narrower windows fall back to Day.</li>+</ul>+</div>++<div class="dv-opt" id="3d">+<div class="dv-olabel"><a class="dv-oid" href="#3d">3d</a>Sliding panes <em>Mac / iPad · each link opens a pane to the right</em></div>+<div class="dv-card" style="border-radius:12px">+<div data-screen-label="3d Mac sliding panes" style="width:1280px;height:800px;position:relative;overflow:hidden;border-radius:12px;background:radial-gradient(1.5px 1.5px at 18% 12%,rgba(255,255,255,.9),transparent),radial-gradient(1px 1px at 72% 8%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 44% 22%,rgba(255,255,255,.5),transparent),radial-gradient(1.5px 1.5px at 88% 30%,rgba(255,255,255,.6),transparent),radial-gradient(1px 1px at 10% 62%,rgba(255,255,255,.5),transparent),radial-gradient(ellipse 60% 45% at 85% -10%,oklch(0.5 0.11 305 / .36),transparent),radial-gradient(ellipse 55% 40% at 8% 110%,oklch(0.5 0.11 220 / .31),transparent),linear-gradient(#0e0d20,#05060d);color:#e9ecf5;font-size:13px;line-height:1.35">+<div style="position:absolute;top:0;left:0;right:0;height:48px;display:flex;align-items:center;gap:18px;padding:0 16px">+<div style="display:flex;gap:8px"><div style="width:12px;height:12px;border-radius:6px;background:#ff5f57"></div><div style="width:12px;height:12px;border-radius:6px;background:#febc2e"></div><div style="width:12px;height:12px;border-radius:6px;background:#28c840"></div></div>+<div style="display:flex;align-items:center;gap:6px;font-size:12.5px;color:#8f97ad"><span>Today</span><span>›</span><span>The Wandering Inn of Iron</span><span>›</span><span>The Ironway Cycle</span><span>›</span><span style="color:oklch(0.85 0.11 220);font-weight:600">M. Hale</span></div>+</div>+<div style="position:absolute;top:48px;left:8px;right:8px;bottom:8px;display:flex;gap:10px">+<div style="width:46px;flex-shrink:0;border-radius:14px;background:rgba(150,180,255,.05);border:1px solid rgba(170,200,255,.12);display:flex;flex-direction:column;align-items:center;padding:14px 0;gap:12px;box-sizing:border-box"><span style="color:oklch(0.82 0.12 220);font-size:13px">✦</span><span style="writing-mode:vertical-rl;font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px;color:#b6bdd1">Today · Wed 23</span></div>+<div style="width:380px;flex-shrink:0;box-sizing:border-box;padding:20px;border-radius:16px;background:rgba(16,22,42,.42);border:1px solid rgba(170,200,255,.13);box-shadow:inset 0 1px 0 rgba(255,255,255,.12);display:flex;flex-direction:column;gap:12px;overflow:hidden;opacity:.86">+<div style="display:flex;gap:14px"><div style="width:52px;height:72px;flex-shrink:0;border-radius:10px;background:linear-gradient(155deg,#5d86d8,#23335c)"></div><div style="display:flex;flex-direction:column;gap:5px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:21px;line-height:1.15">The Wandering Inn of Iron</span><span style="font-size:12px;color:#8f97ad">Royal Road · 64 notes · ▲ 41</span></div></div>+<div style="display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:12px;background:oklch(0.82 0.12 220 / .1);border:1px solid oklch(0.82 0.12 220 / .35);font-size:12.5px"><span style="color:#8f97ad">Book 1 of</span><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:14px;color:oklch(0.88 0.09 220)">The Ironway Cycle</span><span style="margin-left:auto;color:oklch(0.85 0.11 220)">›</span></div>+<div style="display:flex;align-items:center;gap:7px;padding:8px 2px 0"><span style="font-size:9px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Chapter notes</span></div>+<sc-for list="{{ spine3d }}" as="n" hint-placeholder-count="3">+<div style="display:flex;gap:10px"><span style="width:30px;flex-shrink:0;font-family:ui-monospace,Menlo,monospace;font-size:11px;color:#8f97ad;padding-top:2px">{{n.n}}</span><div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:3px"><span style="font-size:12.5px;font-weight:600">{{n.t}}</span><span style="font-size:13px;color:#b6bdd1;line-height:1.45">{{n.note}}</span></div></div>+</sc-for>+</div>+<div style="width:380px;flex-shrink:0;box-sizing:border-box;padding:20px;border-radius:16px;background:rgba(16,22,42,.5);border:1px solid rgba(170,200,255,.14);box-shadow:inset 0 1px 0 rgba(255,255,255,.14);display:flex;flex-direction:column;gap:12px;overflow:hidden">+<div style="position:relative;height:84px"><div style="position:absolute;left:0;top:8px;width:52px;height:72px;border-radius:8px;background:linear-gradient(155deg,#5d86d8,#23335c);transform:rotate(-7deg)"></div><div style="position:absolute;left:36px;top:6px;width:52px;height:72px;border-radius:8px;background:linear-gradient(155deg,#6a8fe0,#2a3570);transform:rotate(2deg);border:1px solid rgba(10,12,24,.8)"></div><div style="position:absolute;left:72px;top:8px;width:52px;height:72px;border-radius:8px;background:linear-gradient(155deg,#c98a5a,#4a2a1a);transform:rotate(9deg);border:1px solid rgba(10,12,24,.8)"></div></div>+<span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:22px">The Ironway Cycle</span>+<div style="display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:12px;background:oklch(0.82 0.12 220 / .1);border:1px solid oklch(0.82 0.12 220 / .35);font-size:12.5px"><span style="color:#8f97ad">Author</span><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:14px;color:oklch(0.88 0.09 220)">M. Hale</span><span style="margin-left:auto;color:oklch(0.85 0.11 220)">›</span></div>+<div style="display:flex;align-items:center;gap:7px;padding:8px 2px 0"><span style="font-size:9px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Reading order</span></div>+<sc-for list="{{ order2d }}" as="o" hint-placeholder-count="4">+<div style="display:flex;align-items:center;gap:10px"><span style="width:26px;text-align:right;font-family:'Newsreader',Georgia,serif;font-size:18px;color:#6d7590">{{o.pos}}</span><div style="width:28px;height:40px;flex-shrink:0;border-radius:5px;background:linear-gradient(155deg,{{o.c1}},{{o.c2}});opacity:{{o.op}}"></div><div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:1px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{o.t}}</span><span style="font-size:11.5px;color:{{o.stC}}">{{o.st}}</span></div></div>+</sc-for>+</div>+<div style="flex:1;min-width:0;box-sizing:border-box;padding:22px;border-radius:16px;background:rgba(16,22,42,.6);backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px);border:1px solid oklch(0.82 0.12 220 / .35);box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 0 40px oklch(0.6 0.12 260 / .16);display:flex;flex-direction:column;gap:10px;overflow:hidden">+<span style="font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Creator</span>+<span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:30px;line-height:1.1">M. Hale</span>+<span style="font-size:12.5px;color:#8f97ad">5 works in your library · 2 series · also credited as "Mara Hale"</span>+<div style="display:flex;align-items:center;gap:7px;padding:12px 2px 0"><span style="font-size:9px;color:oklch(0.82 0.12 305)">✦</span><span style="font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Works</span></div>+<div style="padding:0 12px;border-radius:14px;background:rgba(150,180,255,.05);border:1px solid rgba(170,200,255,.1)">+<sc-for list="{{ creator3d }}" as="w" hint-placeholder-count="5">+<div style="display:flex;align-items:center;gap:10px;height:48px;border-top:1px solid {{w.sep}}"><div style="width:24px;height:34px;flex-shrink:0;border-radius:4px;background:linear-gradient(155deg,{{w.c1}},{{w.c2}})"></div><span style="flex:1;min-width:0;font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{w.t}}</span><span style="font-size:11.5px;color:#8f97ad">{{w.role}} · {{w.st}}</span></div>+</sc-for>+</div>+</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:1240px;columns:2;column-gap:40px">+<li><b>Built for Asterism's links.</b> Work → series → creator → another work, or note → character → the chapter they first appeared in. Each link opens a new pane to the right, the panes before it stay visible, and the oldest fold into narrow strips (Today, here).</li>+<li><b>The link you followed stays highlighted</b> (cyan tint) in its pane, so the path you took is visible on screen, and the breadcrumb repeats it.</li>+<li>⌘[ / ⌘] move along the path, and clicking a folded strip reopens that pane. On iPad landscape two panes fit side by side, and on iPhone this becomes the normal push stack.</li>+<li>The most custom build of the five (a horizontal <code>ScrollView</code> of pane routes). The payoff is a Mac app that feels made for this data, not ported to it.</li>+</ul>+</div>++<div class="dv-opt" id="3e">+<div class="dv-olabel"><a class="dv-oid" href="#3e">3e</a>Reading companion <em>Mac · a floating panel that sees the Safari tab</em></div>+<div class="dv-card" style="border-radius:12px">+<div data-screen-label="3e Mac reading companion" style="width:1280px;height:800px;position:relative;overflow:hidden;border-radius:12px;background:radial-gradient(ellipse 70% 60% at 80% 10%,oklch(0.4 0.09 290 / .6),transparent),radial-gradient(ellipse 60% 50% at 10% 100%,oklch(0.4 0.09 220 / .5),transparent),linear-gradient(#1a1830,#0a0a14);color:#e9ecf5;font-size:13px;line-height:1.35">+<div style="position:absolute;top:0;left:0;right:0;height:26px;display:flex;align-items:center;gap:18px;padding:0 14px;background:rgba(20,22,34,.55);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);font-size:12.5px"><span style="font-weight:700">Safari</span><span style="color:#c9cfdd">File</span><span style="color:#c9cfdd">Edit</span><span style="color:#c9cfdd">View</span><span style="color:#c9cfdd">History</span><span style="flex:1"></span><span style="display:flex;align-items:center;justify-content:center;width:26px;height:20px;border-radius:5px;background:rgba(255,255,255,.18);color:oklch(0.88 0.09 220)">✦</span><span style="color:#c9cfdd">Wed 23 Sep 23:50</span></div>+<div style="position:absolute;top:50px;left:40px;width:780px;bottom:30px;border-radius:12px;background:#1d1e24;border:1px solid rgba(255,255,255,.1);box-shadow:0 20px 60px rgba(0,0,0,.5);overflow:hidden">+<div style="height:46px;display:flex;align-items:center;gap:16px;padding:0 14px;background:#26272e;border-bottom:1px solid rgba(255,255,255,.06)"><div style="display:flex;gap:8px"><div style="width:12px;height:12px;border-radius:6px;background:#ff5f57"></div><div style="width:12px;height:12px;border-radius:6px;background:#febc2e"></div><div style="width:12px;height:12px;border-radius:6px;background:#28c840"></div></div><div style="flex:1;height:28px;border-radius:8px;background:#1b1c21;display:flex;align-items:center;justify-content:center;font-size:12px;color:#9a9ca6">royalroad.com/fiction/…/chapter-687-slinky</div></div>+<div style="padding:40px 90px;display:flex;flex-direction:column;gap:14px">+<div style="height:22px;width:55%;border-radius:4px;background:rgba(255,255,255,.16)"></div>+<div style="height:10px;width:30%;border-radius:4px;background:rgba(255,255,255,.08);margin-bottom:14px"></div>+<div style="height:9px;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;width:92%;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;width:70%;border-radius:4px;background:rgba(255,255,255,.08);margin-bottom:10px"></div>+<div style="height:9px;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;width:96%;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;width:60%;border-radius:4px;background:rgba(255,255,255,.08);margin-bottom:10px"></div>+<div style="height:9px;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;width:88%;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;width:94%;border-radius:4px;background:rgba(255,255,255,.08)"></div><div style="height:9px;width:40%;border-radius:4px;background:rgba(255,255,255,.08)"></div>+</div>+</div>+<div style="position:absolute;top:36px;right:40px;width:380px;box-sizing:border-box;padding:18px;display:flex;flex-direction:column;gap:13px;background:rgba(16,22,42,.72);backdrop-filter:blur(36px) saturate(1.9);-webkit-backdrop-filter:blur(36px) saturate(1.9);border:1px solid rgba(170,200,255,.22);border-radius:22px;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 20px 60px rgba(0,0,0,.5),0 0 40px oklch(0.6 0.12 260 / .16)">+<div style="display:flex;align-items:center;gap:8px"><span style="color:oklch(0.82 0.12 220);font-size:13px">✦</span><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:15px">Asterism</span><span style="margin-left:auto;font-size:11px;color:#8f97ad;background:rgba(150,180,255,.08);padding:3px 9px;border-radius:10px">Following Safari</span></div>+<div style="display:flex;gap:12px;align-items:center"><div style="width:44px;height:62px;flex-shrink:0;border-radius:8px;background:linear-gradient(155deg,#a08a7a,#3c2f4a);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)"></div><div style="min-width:0;display:flex;flex-direction:column;gap:3px"><span style="font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:16px;line-height:1.2">System Change (System Universe)</span><span style="font-size:13px;color:oklch(0.85 0.11 220);font-weight:600">Chapter 687: Slinky</span><span style="font-size:11.5px;color:#8f97ad">Royal Road · Novel · Reading</span></div></div>+<div style="display:flex;gap:8px;align-items:center"><div style="width:48px;height:36px;border-radius:18px;display:flex;align-items:center;justify-content:center;color:oklch(0.85 0.11 220);background:oklch(0.82 0.12 220 / .15);border:1px solid oklch(0.82 0.12 220 / .55);box-shadow:0 0 18px oklch(0.82 0.12 220 / .25)">▲</div><div style="width:48px;height:36px;border-radius:18px;display:flex;align-items:center;justify-content:center;color:#8f97ad;background:rgba(150,180,255,.07)">▼</div><span style="margin-left:auto;font-size:11.5px;color:#8f97ad">Characters: Rook, Ada</span></div>+<div style="min-height:92px;border-radius:18px;padding:12px 14px;box-sizing:border-box;background:rgba(150,180,255,.07);font-size:14px;color:#e9ecf5;line-height:1.5">Filler, but the slinky bit was genuinely funny. Rook's system finally admits it's<span style="display:inline-block;width:1.5px;height:16px;background:oklch(0.82 0.12 220);vertical-align:-3px;margin-left:1px"></span></div>+<div style="height:40px;border-radius:20px;display:flex;align-items:center;justify-content:center;gap:10px;background:linear-gradient(100deg,oklch(0.72 0.13 220),oklch(0.68 0.14 305));color:#fff;font-weight:700;font-size:14px;box-shadow:0 2px 26px oklch(0.7 0.13 262 / .5),inset 0 1px 0 rgba(255,255,255,.3)">Save note <span style="font-weight:500;opacity:.8;font-size:12px">⌘↩</span></div>+<div style="height:1px;background:rgba(170,200,255,.12);margin:2px 0"></div>+<div style="display:flex;flex-direction:column;gap:4px"><span style="font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Last time · Ch 686</span><span style="font-size:13px;color:#b6bdd1;line-height:1.45">Ada's quest reward is clearly the mcguffin for the next arc.</span></div>+<div style="display:flex;flex-direction:column;gap:6px"><span style="font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8f97ad">Also releasing today</span>+<sc-for list="{{ also3e }}" as="a" hint-placeholder-count="2">+<div style="display:flex;align-items:center;gap:10px"><div style="width:22px;height:30px;flex-shrink:0;border-radius:4px;background:linear-gradient(155deg,{{a.c1}},{{a.c2}})"></div><span style="flex:1;min-width:0;font-family:'Newsreader',Georgia,serif;font-weight:550;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{{a.t}}</span><span style="font-size:11.5px;color:{{a.subC}}">{{a.sub}}</span><span style="width:16px;text-align:center;color:{{a.mkC}};font-weight:700">{{a.mk}}</span></div>+</sc-for>+</div>+</div>+</div>+</div>+<ul class="dv-note" style="width:1240px;columns:2;column-gap:40px">+<li><b>Changes what the Mac app is for.</b> On a Mac you read novels in Safari. A floating panel (menu bar extra + <code>NSPanel</code>) follows the front tab, identifies work and chapter with the same URL identity as the share extension, and keeps the note field ready. No share sheet, no switching apps.</li>+<li><b>It shows the context you need while reading</b>: your note from last time, the characters in play, and what else releases today.</li>+<li><b>The main window can then be purely for curating</b> (<a class="dv-oid" href="#3a">3a</a> or <a class="dv-oid" href="#3d">3d</a>) instead of trying to do capture as well.</li>+<li>Catch: following Safari needs a Safari Web Extension (or the Accessibility API) to read the active tab's URL. That's a real extra target to build and a permission prompt.</li>+</ul>+</div>++</div>+<p class="dv-next">Try next: "<a class="dv-oid" href="#3a">3a</a> sidebar with <a class="dv-oid" href="#3b">3b</a>'s full-width Today when Today is selected" · "<a class="dv-oid" href="#3d">3d</a> on iPad landscape" · "spec <a class="dv-oid" href="#3e">3e</a>'s Safari extension"</p>+</section>+</x-dc>+<script type="text/x-dc" data-dc-script>+const CY='oklch(0.82 0.12 220)', CYT='oklch(0.85 0.11 220)', VI='oklch(0.82 0.12 305)', DIM='#8f97ad';+const W={+ih:['Illusion Hunter from Another World','IH','#5b8fe8','#1b2a66','Webtoon','Webtoons'],+su:['System Change (System Universe)','SU','#a08a7a','#3c2f4a','Novel','Royal Road'],+cd:['The Countdown of My Death is Spamming My Status Window','CD','#a7d6f2','#4a6fa8','Webtoon','Webtoons'],+wi:['The Wandering Inn of Iron','WI','#5d86d8','#23335c','Novel','Royal Road'],+sc:['Saturn Court','SC','#43c47e','#1f5a46','Webtoon','Webtoons'],+tp:['Tower of Pale Glass','TP','#e07a5f','#6f2f2c','Webtoon','Tapas'],+sb:['Stellar Bindery','SB','#b48be0','#4f3a80','Novel','Scribble Hub'],+od:['Orbital Decay','OD','#d9b36a','#6a4a22','Novel','Royal Road'],+lg:['A Ledger of Small Gods','LG','#7ac0b0','#2a5a58','Novel','Scribble Hub'],+bl:['Beacon Lines','BL','#6a8fe0','#2a3570','Novel','Royal Road'],+lf:['The Last Foundry','LF','#c98a5a','#4a2a1a','Novel','Royal Road'],+ii:['Ironway: Interludes','II','#8aa0c8','#2f3a55','Novel','Royal Road'],+mk:['Moonlit Kitchen','MK','#e0b0d0','#5a3a60','Webtoon','Webtoons'],+hr:['Hollow Regent','HR','#9a9ab0','#2a2a40','Webtoon','Tapas'],+dq:['Dungeon Quartermaster','DQ','#88b060','#2a4a20','Novel','Royal Road'],+gc:['The Glass Cartographer','GC','#6ac0d8','#1f4a5a','Novel','Scribble Hub'],+nl:['Nine Lanterns','NL','#e8c070','#5a3a10','Webtoon','Tapas'],+sa:['Salt & Signal','SS','#c0a0e0','#3a2a5a','Novel','Royal Road']+};+const f=(k,x)=>{const a=W[k];return Object.assign({t:a[0],ini:a[1],c1:a[2],c2:a[3],ty:a[4],site:a[5]},x||{});};+const sep=(arr)=>arr.map((x,i)=>Object.assign(x,{sep:i?'rgba(170,200,255,.1)':'transparent'}));+const DONE={mk:'✓',mkC:CYT,mkBg:'oklch(0.82 0.12 220 / .16)',mkBd:'oklch(0.82 0.12 220 / .5)',mkBs:'solid',subC:DIM};+const DUE={mk:'',mkC:DIM,mkBg:'transparent',mkBd:'rgba(170,200,255,.45)',mkBs:'dashed',subC:CYT};+const sel=(on)=>on?{bg:'oklch(0.82 0.12 220 / .14)',bd:'oklch(0.82 0.12 220 / .45)',fc:CYT}:{bg:'rgba(150,180,255,.055)',bd:'rgba(170,200,255,.13)',fc:'#c9cfdd'};++class Component extends DCLogic {+ renderVals() {+ const week=[{l:'M',n:21,notes:2,rel:0},{l:'T',n:22,notes:3,rel:0},{l:'W',n:23,notes:4,rel:0,sel:1},{l:'T',n:24,notes:0,rel:2},{l:'F',n:25,notes:0,rel:1},{l:'S',n:26,notes:0,rel:1},{l:'S',n:27,notes:0,rel:2}];+ const weekA=week.map(d=>Object.assign({},d,{+ bg:d.sel?'oklch(0.82 0.12 220 / .12)':'transparent',+ bd:d.sel?'oklch(0.82 0.12 220 / .5)':'transparent',+ lc:d.sel?CY:DIM, nc:d.sel?CYT:'#e9ecf5',+ marks:d.notes?Array.from({length:Math.min(d.notes,3)},()=>({bg:d.sel?CY:'#b6bdd1',bd:'transparent'})):Array.from({length:d.rel},()=>({bg:'transparent',bd:VI}))+ }));+ const noted=sep([+ f('cd',{time:'23:33',ch:'26. A Gift from the King',note:'So the monitor is Gerhardt, and he can read the countdown too. That reframes the whole first season.'}),+ f('ih',{time:'21:05',ch:'(S2) Episode 85',note:'Finally a fight where the illusions have rules. Best episode of the season.'}),+ f('su',{time:'12:40',ch:'Chapter 687: Slinky',note:'Filler, but the slinky bit was genuinely funny.'}),+ f('wi',{time:'08:10',ch:'Ch 341 · The Long Way Down',note:'Mine arc payoff. Maren gets actual dialogue again.'})+ ]);+ const shelf=(x)=>Object.assign(x,x.done?{op:.62,ring:'inset 0 1px 0 rgba(255,255,255,.25)',due:false}:{op:1,due:true,done:false,ring:'0 0 0 1.5px oklch(0.82 0.12 220 / .75),0 0 22px oklch(0.82 0.12 220 / .35),inset 0 1px 0 rgba(255,255,255,.3)'});+ const relShelf=[f('sc',{sub:'Ep 32'}),f('mk',{sub:'Ep 118'}),f('ih',{sub:'Ep 85',done:true}),f('su',{sub:'Ch 687',done:true})].map(shelf);+ const chip=(l,n,on)=>Object.assign({l,n},sel(on));+ return {+ weekA, noted, relShelf,+ rel1a:[f('sc',Object.assign({sub:'Episode 32 · not read yet'},DUE)),f('ih',Object.assign({sub:'S2 · Episode 85'},DONE)),f('su',Object.assign({sub:'Ch 687 · Slinky'},DONE))],+ catch1b:sep([+ f('cd',{known:true,pct:'65%',frac:'26/40',behind:'14 episodes behind',bc:CYT,next:'Ep 27'}),+ f('dq',{known:true,pct:'62%',frac:'42/~68',behind:'~26 chapters behind',bc:CYT,next:'Ch 43'}),+ f('hr',{known:false,behind:'Last read Ep 9 · ~2 releases since',bc:DIM,next:'Ep 10'})+ ]),+ toRead5a:sep([f('gc',{meta:'Scribble Hub · added 3 May'}),f('sa',{meta:'Royal Road · added 20 May'}),f('nl',{meta:'Tapas · added 2 Jun'}),f('ii',{meta:'Royal Road · added 11 Jun'}),f('lf',{meta:'Royal Road · added 9 Jul'}),f('lg',{meta:'Scribble Hub · added 28 Aug'}),f('sb',{meta:'Scribble Hub · added 14 Sep'})]).map(x=>Object.assign(x,{hasLine:false})),+ reading5d:sep([+ f('cd',{meta:'Webtoons · Wednesdays',line:'Ep 26 · noted 23:33',lineC:'#b6bdd1'}),+ f('ih',{meta:'Webtoons · Wed, Sun',line:'S2 Ep 85 · noted 21:05',lineC:'#b6bdd1'}),+ f('su',{meta:'Royal Road · daily',line:'Ch 687 · noted 12:40',lineC:'#b6bdd1'}),+ f('wi',{meta:'Royal Road',line:'Ch 341 · noted 08:10',lineC:'#b6bdd1'}),+ f('sc',{meta:'Webtoons · Wednesdays',line:'Ep 31 · last week · new today',lineC:CYT}),+ f('bl',{meta:'Royal Road · Sundays',line:'Ch 211 · 3 days ago',lineC:'#b6bdd1'}),+ f('mk',{meta:'Webtoons · Thursdays',line:'Ep 117 · 6 days ago',lineC:'#b6bdd1'})+ ]).map(x=>Object.assign(x,{hasLine:true})),+ series5b:(()=>{+ const S=(n)=>({bg:n===2?CY:n===1?'oklch(0.82 0.12 220 / .45)':'rgba(170,200,255,.14)'});+ const row=(name,count,segs,next,a,b,c,done)=>{const n=segs.length;return {name,count,segs:segs.map(S),next,nextC:done?DIM:CYT,a:f(a),b:f(b||a),c:f(c||a),op:done?.6:1,n1:n===1,n2:n===2,n3:n>=3,hasMore:n>3,more:'+'+(n-3)};};+ return [+ {l:'In progress',rows:[+ row('The Hollow Crown','1 work',[1],'Next: Hollow Regent · Ep 10','hr'),+ row('The Ironway Cycle','4 works',[2,1,0,0],'Next: Beacon Lines · Ch 212','bl','wi','lf'),+ row('System Universe','3 works',[1,0,0],'Next: System Change · Ch 688','su','od','gc'),+ row('Saturn Court','2 seasons',[2,1],'Next: Season 2 · Ep 32 today','sc','mk','lg')+ ]},+ {l:'Not started',rows:[row('Nine Lanterns','2 works',[0,0],'Start with Nine Lanterns','nl','hr','tp')]},+ {l:'Completed',rows:[row('Salt & Signal','3 works',[2,2,2],'Finished Aug 2026','sa','dq','ii',true)]}+ ];+ })(),+ catch1a:[f('cd',{at:'Episode 26 of 40',behind:'14',pct:'65%',known:true,unknown:false}),f('hr',{at:'Last read Ep 9 · ~2 releases since',known:false,unknown:true})],+ list1c:[+ f('sc',{ic:'○',icC:VI,sub:'Episode 32 · releasing today',subC:CYT,time:'due',timeC:VI,op:1}),+ f('cd',{ic:'✦',icC:CY,sub:'26. A Gift from the King',subC:DIM,time:'23:33',timeC:CYT,op:1}),+ f('ih',{ic:'●',icC:'#dfe6ff',sub:'(S2) Episode 85 · released today',subC:DIM,time:'21:05',timeC:DIM,op:1}),+ f('su',{ic:'●',icC:'#dfe6ff',sub:'Chapter 687 · released today',subC:DIM,time:'12:40',timeC:DIM,op:1}),+ f('wi',{ic:'●',icC:'#dfe6ff',sub:'Ch 341 · The Long Way Down',subC:DIM,time:'08:10',timeC:DIM,op:1})+ ],+ chips2a:[chip('Reading',38),chip('Catching up',4,true),chip('To read',12),chip('On hiatus',3),chip('Series',7),chip('Finished',54)],+ rows2a:[f('cd',{behind:'» 14 episodes behind',bc:CYT,count:26}),f('dq',{behind:'» ~26 chapters behind',bc:CYT,count:64}),f('od',{behind:'» 6 chapters behind',bc:CYT,count:112}),f('hr',{behind:'Last read Ep 9 · set latest',bc:DIM,count:9})],+ tokens2a:sep([{k:'Type',v:'Novel, Webtoon, Manga…'},{k:'Tag',v:'litrpg, progression, cozy…'},{k:'Site',v:'Royal Road, Webtoons…'},{k:'Creator',v:'M. Hale, Kim Jae-won…'},{k:'Releases',v:'on a weekday · none set'}]),+ tiles2b:[+ {l:'Catching up',n:4,c:CYT,sub:'83 chapters behind',covers:[f('cd'),f('dq'),f('od')]},+ {l:'Reading',n:38,c:'#e9ecf5',sub:'3 release today',covers:[f('ih'),f('su'),f('sc')]},+ {l:'To read',n:12,c:'#e9ecf5',sub:'oldest from March',covers:[f('sb'),f('lg'),f('lf')]},+ {l:'Series',n:7,c:'#e9ecf5',sub:'3 in progress',covers:[f('bl'),f('su'),f('sc')]}+ ],+ list2b:sep([{ic:'◎',l:'Creators',n:21},{ic:'‖',l:'On hiatus',n:3},{ic:'✓',l:'Finished',n:54},{ic:'◌',l:'Abandoned',n:9},{ic:'✦',l:'All works',n:126}]),+ recent2b:[f('cd',{sub:'26. A Gift from the King · 23:33',count:26}),f('ih',{sub:'(S2) Episode 85 · 21:05',count:85})],+ shelves2c:[+ {l:'Catching up',n:4,items:[f('cd',{b:'14 behind',bc:CYT}),f('dq',{b:'22 behind',bc:CYT}),f('od',{b:'6 behind',bc:CYT}),f('hr',{b:'41 behind',bc:CYT})]},+ {l:'To read',n:12,items:[f('sb',{b:'added Sep',bc:'#c9cfdd'}),f('lg',{b:'added Aug',bc:'#c9cfdd'}),f('lf',{b:'added Jul',bc:'#c9cfdd'}),f('ii',{b:'added Jun',bc:'#c9cfdd'})]}+ ],+ hiatus2c:[f('tp',{b:'since Jun'}),f('gc',{b:'since Apr'}),f('nl',{b:'since Jan'})],+ series2c:[+ {name:'The Ironway Cycle',n:'4 works · 2 read',a:f('wi'),b:f('bl'),c:f('lf')},+ {name:'System Universe',n:'3 works · 1 read',a:f('su'),b:f('od'),c:f('gc')},+ {name:'Saturn Court',n:'2 seasons',a:f('sc'),b:f('mk'),c:f('lg')}+ ],+ order2d:[+ f('wi',{pos:'1',st:'Finished · 342 chapters',stC:DIM,ic:'✓',icC:CYT,op:.7}),+ f('bl',{pos:'2',st:'Reading · last noted Ch 211',stC:CYT,ic:'◐',icC:CYT,op:1}),+ f('ii',{pos:'2.5',st:'To read · 6 interludes',stC:DIM,ic:'◇',icC:DIM,op:1}),+ f('lf',{pos:'3',st:'To read · not started',stC:DIM,ic:'◇',icC:DIM,op:1})+ ],+ side3a:[+ {item:true,l:'Today',ic:'◷',n:''},+ {head:true,l:'Library'},+ {item:true,l:'Reading',ic:'◐',n:38},+ {item:true,l:'Catching up',ic:'»',n:4,sel:true},+ {item:true,l:'To read',ic:'◇',n:12},+ {item:true,l:'On hiatus',ic:'‖',n:3},+ {item:true,l:'Finished',ic:'✓',n:54},+ {item:true,l:'All works',ic:'✦',n:126},+ {head:true,l:'Collections'},+ {item:true,l:'Series',ic:'≡',n:7},+ {item:true,l:'The Ironway Cycle',ic:'',n:4,ind:true},+ {item:true,l:'System Universe',ic:'',n:3,ind:true},+ {item:true,l:'Saturn Court',ic:'',n:2,ind:true},+ {item:true,l:'Creators',ic:'◎',n:21},+ {item:true,l:'Unattached notes',ic:'✎',n:7}+ ].map(s=>Object.assign({head:false,item:false},s,{bg:s.sel?'oklch(0.82 0.12 220 / .14)':'transparent',fc:s.sel?CYT:(s.ind?'#b6bdd1':'#e9ecf5'),icc:s.sel?CY:DIM,pl:s.ind?'38px':'10px'})),+ rows3a:[f('cd',{behind:'» 14 episodes behind',bc:CYT,count:26,bd:'oklch(0.82 0.12 220 / .45)',bg:'rgba(150,180,255,.09)'}),f('dq',{behind:'» ~26 chapters behind',bc:CYT,count:64,bd:'rgba(170,200,255,.13)',bg:'rgba(150,180,255,.055)'}),f('od',{behind:'» 6 chapters behind',bc:CYT,count:112,bd:'rgba(170,200,255,.13)',bg:'rgba(150,180,255,.055)'}),f('hr',{behind:'Last read Ep 9 · set latest',bc:DIM,count:9,bd:'rgba(170,200,255,.13)',bg:'rgba(150,180,255,.055)'})],+ spine3a:[+ {n:'26',t:'A Gift from the King',when:'today',note:'So the monitor is Gerhardt, and he can read the countdown too. That reframes the whole first season.'},+ {n:'25',t:'The Second Window',when:'yesterday',note:'Two status windows at once is a great visual gag. Keep an eye on the timer colours.'},+ {n:'24',t:'Monitor',when:'Mon',note:'Slow one. The king subplot is doing nothing yet.'}+ ],+ catch3b:[f('cd',{at:'Ep 26 of 40',behind:'14',pct:'65%'}),f('dq',{at:'Ch 42 of 64',behind:'22',pct:'66%'}),f('od',{at:'Ch 106 of 112',behind:'6',pct:'94%'})],+ board3c:[+ {d:'Mon',n:21,bg:'transparent',bd:'transparent',nc:'#e9ecf5',cards:[+ {k:'r',t:'Illusion Hunter',s:'Ep 84 ✓',c1:'#5b8fe8',c2:'#1b2a66'},+ {k:'n',t:'System Change',s:'Ch 684',x:'Two chapters of logistics. Here for it.',c1:'#a08a7a',c2:'#3c2f4a'},+ {k:'n',t:'Wandering Inn',s:'Ch 339',x:'Setup chapter. Fine.',c1:'#5d86d8',c2:'#23335c'}]},+ {d:'Tue',n:22,bg:'transparent',bd:'transparent',nc:'#e9ecf5',cards:[+ {k:'r',t:'System Change',s:'Ch 685–686 ✓',c1:'#a08a7a',c2:'#3c2f4a'},+ {k:'n',t:'Countdown',s:'Ep 24',x:'Slow one. King subplot doing nothing yet.',c1:'#a7d6f2',c2:'#4a6fa8'},+ {k:'n',t:'Countdown',s:'Ep 25',x:'Two status windows at once. Great gag.',c1:'#a7d6f2',c2:'#4a6fa8'},+ {k:'n',t:'Wandering Inn',s:'Ch 340',x:'Who lit the third fire? Calling it: Ilse.',c1:'#5d86d8',c2:'#23335c'}]},+ {d:'Wed',n:23,bg:'oklch(0.82 0.12 220 / .05)',bd:'oklch(0.82 0.12 220 / .28)',nc:CYT,cards:[+ {k:'r',t:'Illusion Hunter',s:'Ep 85 ✓',c1:'#5b8fe8',c2:'#1b2a66'},+ {k:'r',t:'System Change',s:'Ch 687 ✓',c1:'#a08a7a',c2:'#3c2f4a'},+ {k:'n',t:'Countdown',s:'Ep 26',x:'So the monitor is Gerhardt…',c1:'#a7d6f2',c2:'#4a6fa8',sel:true},+ {k:'d',t:'Saturn Court',s:'Ep 32 · due',c1:'#43c47e',c2:'#1f5a46'}]},+ {d:'Thu',n:24,bg:'transparent',bd:'transparent',nc:'#e9ecf5',cards:[+ {k:'d',t:'Moonlit Kitchen',s:'Ep 118',c1:'#e0b0d0',c2:'#5a3a60'},+ {k:'d',t:'System Change',s:'Ch 688',c1:'#a08a7a',c2:'#3c2f4a'}]},+ {d:'Fri',n:25,bg:'transparent',bd:'transparent',nc:'#e9ecf5',cards:[+ {k:'d',t:'Dungeon Quartermaster',s:'Ch 65',c1:'#88b060',c2:'#2a4a20'}]},+ {d:'Sat',n:26,bg:'transparent',bd:'transparent',nc:'#e9ecf5',cards:[+ {k:'d',t:'System Change',s:'Ch 689',c1:'#a08a7a',c2:'#3c2f4a'}]},+ {d:'Sun',n:27,bg:'transparent',bd:'transparent',nc:'#e9ecf5',cards:[+ {k:'d',t:'Illusion Hunter',s:'Ep 86',c1:'#5b8fe8',c2:'#1b2a66'},+ {k:'d',t:'Beacon Lines',s:'Ch 212',c1:'#6a8fe0',c2:'#2a3570'}]}+ ].map(day=>Object.assign(day,{cards:day.cards.map(c=>Object.assign({hasX:!!c.x,x:c.x||''},c,+ c.k==='d'?{bg:'transparent',bd:'rgba(170,200,255,.28)',bs:'dashed',op:.85,sc:VI}:+ c.sel?{bg:'rgba(150,180,255,.1)',bd:'oklch(0.82 0.12 220 / .6)',bs:'solid',op:1,sc:CYT}:+ c.k==='r'?{bg:'rgba(150,180,255,.04)',bd:'rgba(170,200,255,.1)',bs:'solid',op:.7,sc:DIM}:+ {bg:'rgba(150,180,255,.06)',bd:'rgba(170,200,255,.13)',bs:'solid',op:1,sc:CYT}))})),+ spine3d:[+ {n:'341',t:'The Long Way Down',when:'today',note:'Mine arc payoff. Maren gets actual dialogue again.'},+ {n:'340',t:'Signal Fires',when:'12 May',note:'Three fires reveal is great. Who lit the third? Calling it now: Ilse.'},+ {n:'339',t:'Provisions',when:'9 May',note:'Setup chapter. Fine.'}+ ],+ creator3d:sep([f('wi',{role:'Author',st:'Finished'}),f('bl',{role:'Author',st:'Reading'}),f('ii',{role:'Author',st:'To read'}),f('lf',{role:'Author',st:'To read'}),f('sa',{role:'Illustrator',st:'Not in a series'})]),+ also3e:[f('ih',{sub:'Ep 85 · read',subC:DIM,mk:'✓',mkC:CYT}),f('sc',{sub:'Ep 32 · due',subC:CYT,mk:'○',mkC:VI})]+ };+ }+}++</script>+</body>+</html>
diff --git a/docs/Asterism-works-redesign.md b/docs/Asterism-works-redesign.mdnew file mode 100644index 00000000..dcdb1a9c--- /dev/null+++ b/docs/Asterism-works-redesign.md@@ -0,0 +1,258 @@+# Handover: Works tab — option 2b ("Library home")++Target mockups in `Asterism Rethink.dc.html`:+- **2b**: Works home (hub)+- **5a**: status group screen, To read+- **5d**: status group screen, Reading (the pattern every regular group follows)+- **4a**: the Catching up group (its "behind" model is specified in `docs/handover-today-1b.md` §5–7; reuse it, don't re-spec it)+- **5b**: Series index+- **5c**: series cover fan rules+- **2d**: Series page++Visual language follows `asterism-style-guide.md` / ConstellationKit. No new tokens.++Scope: the iPhone Works tab. On iPad and Mac the hub's entries will later become the sidebar (option 3a). Build the destinations so they can be pushed from either, but the wide layouts themselves are out of scope.++---++## 1. What changes, at a glance++| Area | Current (`WorksView.swift`) | 2b |+|---|---|---|+| Works root | One long list of every work plus the Unattached Notes group | **Hub**: search field, 4 tiles (3 statuses + Series), a list of other destinations, Recently noted |+| Sort & filter | `optionsMenu`: 1 sort picker, Group-by-series toggle, 8 inline filter pickers, pill row, "No matching works" state | **Removed.** Status becomes where you go. Other dimensions become **search tokens** (§6). Each destination has its own default sort and a small ↕ override |+| Series | Toolbar button → series list; optional group-by-series sections | **Series tile on the hub** → Series index (5b) → Series page (2d). The Group-by-series toggle goes |+| Creators | Toolbar button | **Creators row on the hub** → the existing creator list |+| Unattached notes | Section at the bottom of the root list | Moves into **All works** as its trailing section (unchanged group styling) |+| Toolbar | Series, Creators, options menu, New Work | **New Work only** on the hub. Group screens get ↕ + New Work |++Keep all row affordances exactly as they are: Merge/Resolve pills, "To Read?" pill, "Not <title>" dismiss pills, selection border, abandoned knock-down, `WorkRow`'s accessibility labels.++---++## 2. Destinations model++Add one value type that names every place the hub links to. The hub, the group screen and (later) the iPad/Mac sidebar all read it.++```swift+nonisolated enum WorksDestination: Hashable, Sendable {+ case group(WorksGroup) // status-backed lists (5a/5d/4a)+ case allWorks+ case seriesIndex // 5b+ case creators // existing CreatorListView+}++nonisolated enum WorksGroup: String, CaseIterable, Hashable, Sendable {+ case catchingUp, reading, toRead, onHiatus, finished, abandoned+}+```++Membership of each group:++| Group | Predicate | Note |+|---|---|---|+| `catchingUp` | `readingStatus == .catchingUp` | |+| `reading` | `readingStatus == .reading` **and** `workStatus != .hiatus` | Paused works belong in On hiatus, not Reading |+| `toRead` | `readingStatus == .toRead` | |+| `onHiatus` | `workStatus == .hiatus` **and** `readingStatus ∈ {reading, catchingUp}` | Hiatus is a **work** status (`WorkStatus.hiatus`), not a reading status. A finished or abandoned work on hiatus isn't something you're waiting for, so leave it out |+| `finished` | `readingStatus == .finished` | |+| `abandoned` | `readingStatus == .abandoned` | |++Put `WorksGroup.members(of:)`, its sort, and its row detail (§4) in `WorksListOptions.swift` beside `WorksFilter`, so they can be tested without a view, like the existing types.++---++## 3. Hub (2b)++Layout, top to bottom:++1. **Large title** "Works" in Newsreader. Toolbar: New Work (`plus`) only.+2. **Search field**, prompt "Search N works". Typing or adding a token switches the hub to a results list (§6). Clearing the search restores the hub.+3. **Tile grid**: 2 × 2 `LazyVGrid`, 10 pt gap, tiles 112 pt tall with the card recipe (radius 20). Order: **Catching up, Reading, To read, Series**. The Series tile opens the Series index (§5), not a status group.+ - Top-leading: the count (28 pt bold). It's cyan on Catching up and primary on the rest.+ - Top-trailing: up to 3 overlapping mini covers (22 × 31, −8 pt overlap, 1.5 pt dark border), taken from the first three members in the group's sort.+ - Bottom: the group name (15 pt semibold), then a one-line stat (11.5 pt secondary):++ | Tile | Stat | Source |+ |---|---|---|+ | Catching up | "~42 chapters behind" | Sum of `CatchUpProgress.behind` over known rows, with `~` if any row is estimated. If none are known, "N works" |+ | Reading | "3 release today" | Count of members with a release today (`TodaySchedule`). Omit the stat when 0 |+ | To read | "oldest from March" | Month of the oldest `createdAt` |+ | Series | "3 in progress" | Count of series in the In progress section (§5). The tile's count is the number of series, and its mini covers are the next-up covers of the first three in-progress series |++ A tile with 0 members still shows, with the count 0 and no covers, so the grid stays stable.+4. **Destination list**: one grouped card with hairline separators, 46 pt rows. Each row has a violet glyph, a label, a trailing count and a chevron.+ - Creators (`person.2`) with the count of creators+ - On hiatus (`pause.circle`, the symbol `WorkStatusPresentation` already uses)+ - Finished (`checkmark`)+ - Abandoned (`book.closed`)+ - All works (✦ glyph) with the total++ Use the SF Symbols `ReadingStatusPresentation.systemImage` already uses, so a glyph means the same thing everywhere.+5. **Recently noted**: section header plus up to **3** compact rows (36 × 50 cover, title, "last chapter · time"). A row opens the work. Hide the section when there are no notes.++Accessibility identifiers: `works-hub`, `works-tile-<group>` / `works-tile-series`, `works-destination-<name>`, `works-recent-row-<id>`.++Dynamic Type: at accessibility sizes the tile grid becomes a single column of full-width tiles, and the mini covers are hidden.++Empty and first-sync states: keep `ArrivingLibraryPresentation` exactly as it is, in place of the whole hub.++---++## 4. Status group screen (5a, 5d; 4a for Catching up)++This is **one view**, `WorksGroupView(group:)`, used for every `WorksGroup`. It's a push from the hub.++- **Header**: back button "Works", large serif title (the group name), and a subtitle "N works · <sort phrase>" (12.5 pt secondary).+- **Toolbar**: ↕ sort menu and New Work. A work created from a group screen starts with that group's reading status: To read → `.toRead`, Catching up → `.catchingUp`, others → default.+- **Search field**: "Search in <group>". Scoped to the group's members, and accepts tokens (§6).+- **List**: **one flat grouped card** (card recipe, radius 20, 1 pt `cardBorder` hairlines). No subgroups on any regular group. Rows are `WorkRow`-based, keep all existing pills, and open the work on tap. **No trailing action buttons.**+- **Swipe actions** (trailing): "Change status…" opens the existing reading-status picker. It's the one row action, and it's the same on every group.++Per-group defaults:++| Group | Default sort | Sort phrase | Row detail line |+|---|---|---|---|+| Reading | last noted, newest first (repository order, i.e. `WorksSort.newest`) | "last noted first" | "Ep 26 · noted 23:33" / "Ch 211 · 3 days ago". If the work releases today and you haven't noted it today, append " · new today" in cyan |+| To read | `createdAt` ascending | "oldest added first" | "<site> · added 3 May" |+| Catching up | most behind first, unknowns last | "most behind first" | See the Today handover §5 (exact / estimated / unknown) plus the caught-up banner. Reuse `CatchUpProgress` |+| On hiatus | longest paused first (fall back to last noted, oldest first) | "longest paused first" | "Paused since Jun" (fall back to "Last noted <date>") |+| Finished | date finished, newest first (fall back to last note) | "recently finished first" | "Finished Aug 2026" |+| Abandoned | date abandoned, newest first (fall back to last note) | "recently abandoned first" | "Stopped Jul 2026" plus the verdict's first line when there is one |++The ↕ menu offers the group's default plus "A to Z" and "Newest added". Persist the choice **per group** (`@AppStorage("worksGroup.sort.<group>")`) and add the keys to `WorksListStorageKey.seededLaunchResets`. Relative times ("3 days ago", "23:33") use the same formatter Today uses.++The abandoned knock-down (`WorksRowPresentation.isKnockedDown`) applies only where abandoned works appear, which is now the Abandoned group and All works. It's harmless to leave it in the row.++**All works** uses the same view with every work, default sort `WorksSort.newest`, and the ↕ options Newest / Oldest / A to Z / Z to A (today's `WorksSort`, unchanged). Its trailing section is the **Unattached Notes** group, moved here unchanged, and still hidden under a query or token.++Identifiers: `works-group-<group>`, `works-group-search`, `works-group-sort-menu`, and rows keep `work-row-<uuid>`.++---++## 5. Series index (5b) and cover fan (5c)++`SeriesIndexView` replaces the current series list screen reached from the toolbar. Reuse its data source. The large title is "Series" and the subtitle is "N series · M works". Toolbar: New Series (`plus`), the existing create flow.++**Sections** are derived from member reading statuses:++| Section | Rule |+|---|---|+| In progress | at least one member is reading or catching up, **or** some are finished and some are to read |+| Not started | every member is to read |+| Completed | every member is finished or abandoned, with at least one finished. Draw the cards at opacity 0.6 |++Within a section, sort In progress by last noted in any member (newest first), and sort Not started and Completed by name (`SeriesOrdering`).++**Card** (separate cards with a 9 pt gap, radius 20), laid out as: fan (62 × 62) · name (Newsreader 16, one line) with a trailing work count · progress segments · next line · chevron.++- **Count text**: "1 work" or "N works". Never "so far".+- **Progress segments**: one 4 pt segment per member in `SeriesMemberOrdering`, 3 pt gap. Finished = cyan, reading or catching up = cyan at 45%, to read = `rgba(170,200,255,.14)`. Draw abandoned the same as to read and skip it for "next".+- **Next line** (12 pt):+ - In progress: "Next: <title> · <next chapter>" in cyan. Next chapter comes from `ChapterKeyDerivation`, as in the Today handover. If the chapter isn't numeric, drop the "· <chapter>" part. Append " today" when the work releases today.+ - Not started: "Start with <first member>".+ - Completed: "Finished <month year>" (secondary).+- Tapping a card pushes the Series page (2d).++**Next-up work** = the first member in `SeriesMemberOrdering` whose reading status isn't finished or abandoned. Put this in a pure `SeriesProgress.build(series:members:)` in AsterismCore (with tests), because the index, the fan and the series page all use it.++**Fan rules (5c)**, one `SeriesCoverFan(covers:, size:)` view used everywhere a series is drawn (5b, 2d, and later 2c/3d):++| Members | Drawing |+|---|---|+| 1 | The member's cover in front, and one **dashed empty slot** behind it (same size, rotated +9°, 1.2 pt dashed `rgba(170,200,255,.35)`, no fill). It disappears once there's a second member |+| 2 | An offset pair: the back cover rotated +8° at 85% opacity, the front rotated −4° |+| 3 | The full fan: back-left −9° at 75%, back-right +9° at 85%, front upright with a shadow |+| 4+ | The 3-cover fan plus a "+N" capsule at the bottom-trailing edge (N = members − 3) |++Which covers: the **front is the next-up work**, and the back covers are its neighbours in reading order (previous, then next, clamped to the ends of the series). A completed series puts member 1 in front. Missing art uses the existing `WorkThumbnailView` gradient-and-initials fallback.++Accessibility: the fan is decorative (`.accessibilityHidden(true)`). The card label is "<name>, N works, <finished> of N finished, next: <title>".++Identifiers: `series-index`, `series-card-<uuid>`.++---++## 6. Search tokens (replacing the filter menu)++Use `.searchable(text:tokens:suggestedTokens:)` on the hub, on each group screen and on All works.++Token kinds map 1:1 onto the existing `WorksFilter` dimensions, so `WorksFilter.apply`, `pruned(to:)` and `WorksFilterOptions` stay as they are:++| Token | `WorksFilter` field | Offered in |+|---|---|---|+| Type: … | `type` | everywhere |+| Tag: … | `tag` | everywhere |+| Site: … | `hostname` | everywhere |+| Series: … | `series` (incl. "No series") | everywhere |+| Creator: … | `creator` (incl. "No creators") | everywhere |+| Status: Ongoing / Finished / On hiatus | `workStatus` | everywhere except the On hiatus group |+| Reading: … | `readingStatus` | **hub results and All works only**. On a group screen the group already sets it |+| Releases: has / none | `releaseDays` | everywhere |++- **One token per dimension.** Adding a second Tag token replaces the first. This keeps `WorksFilter`'s single-value model; multi-value can come later if you miss it.+- **Suggestions**: with the field empty, suggest the dimension names ("Type", "Tag", "Site"…). After a dimension prefix ("tag:" or picking "Tag"), list its values from `WorksFilterOptions`, filtered by the text typed.+- **Token spelling** reuses `WorksFilterPresentation.activeLabels`, so tokens read like today's pills.+- **Results**: on the hub, a query or token replaces the hub content with a flat result list (All works' rows, no Unattached section). On a group screen it narrows the group.+- **Empty**: keep the two existing states. `ContentUnavailableView.search` covers a query-only miss, and the "No matching works" state covers a token miss. Its Clear action removes every token and leaves the query.+- **Mac**: the `listSearch` seam's `ColumnSearchField` needs token support, or the Mac falls back to typed prefixes ("tag:litrpg") parsed into the same `WorksFilter`. Pick one and note it in `docs/agent-notes`; the phone behaviour doesn't depend on it.++**Delete**: `optionsMenu`, `filterPicker`, `filterPills`, `clearFiltersButton` (keep one Clear inside the empty state), the Group-by-series toggle, `WorksListStorageKey.groupBySeries`, `WorksGrouping`'s series branch (keep `ungrouped`), and the Series and Creators toolbar buttons. Update `WorksListOptionsTests` and the UI journeys that drive the menu so they use tokens instead.++---++## 7. Series page (2d)++Extend `SeriesDetailView`'s **view mode**. Edit mode stays exactly as it is.++1. **Header**: `SeriesCoverFan` at a larger size (front cover 72 × 100), centred; the series title in Newsreader 27 centred; a meta line with the work count, creators (from the members' credits) and site(s). Keep the notes block under it when there are notes.+2. **Progress**: the same segments as 5b at 6 pt, with a caption row: "1 finished · 1 reading" on the leading side and "2 to read" on the trailing side.+3. **Next up card**: "NEXT UP · BOOK 2", the title, and "Last noted Ch 211 · 3 days ago", with a gradient primary button "Continue at Ch 212 ↗" that opens the next-chapter URL (the Today handover's URL rule, falling back to the work's primary URL). Hide the card when the series is completed. If the next-up work has no notes, label the button "Start" and open the work's primary URL.+4. **Reading order**: section header plus Edit, which enters the existing edit mode. Each row shows the position (Newsreader 22, secondary, trailing-aligned in a 30 pt column, `SeriesPosition.format`, so "2.5" works), a 34 × 48 cover (opacity 0.7 when finished), the title, and the status in words: "Finished · 342 chapters", "Reading · last noted Ch 211" (cyan), "To read · not started". Keep the `isCurrent` check mark. Rows open the work.++Identifiers: `series-detail-fan`, `series-detail-progress`, `series-detail-next-up`, `series-detail-continue`. Keep the existing `series-member-<uuid>`.++---++## 8. Navigation++- Works tab `NavigationStack` path: `WorksDestination` → work detail / series page / creator page, as today.+- Deep links and state restoration (`RestoreStorageKey`): restore the last `WorksDestination` so the tab comes back to the group you were in.+- iPad and Mac (`ipad-and-mac-layouts`): until option 3a is built, the wide tree's list column shows the hub, and choosing a tile replaces the column's content with the group (it doesn't push into the detail column). `selectedWorkID` highlighting still applies inside group lists.++---++## 9. Model additions++All optional, so it's a lightweight migration:++```swift+var workStatusChangedAt: Date? // set when workStatus changes; drives "Paused since" and "longest 9 months"+var readingStatusChangedAt: Date? // set when readingStatus changes; drives "Finished Aug 2026" / "Stopped Jul 2026"+```++Existing works have `nil` there, so the §4 fallbacks apply. Don't backfill guessed dates.++`CatchUpProgress` and the latest-released fields come from the Today handover. If that ships second, the Catching up tile and group use the "unknown" presentation until it lands.++---++## 10. Out of scope++- 2a / 2c / 2e, and the iPad/Mac layouts (3a–3e).+- Changes to the creator page.+- RSS for the latest chapter.++## 11. Acceptance checklist++- [ ] Works root is the hub: search, 4 tiles (Catching up, Reading, To read, Series; with counts, covers and stats), On hiatus in the destination list, the destination list, Recently noted (≤3). The toolbar has New Work only.+- [ ] Every status group opens the same screen: a flat single-card list, the group's default sort and detail line, scoped search, ↕ persisted per group, and no row action buttons.+- [ ] On hiatus is driven by `WorkStatus.hiatus` and Reading excludes paused works.+- [ ] Catching up reuses `CatchUpProgress` (exact / estimated / unknown / caught-up banner).+- [ ] All works holds every work plus the Unattached Notes group.+- [ ] The options menu, pills, Group-by-series toggle, and the Series and Creators toolbar buttons are gone. Tokens cover every former filter dimension.+- [ ] The Series index is grouped In progress / Not started / Completed, with count text "1 work" / "N works", segments and a next line.+- [ ] `SeriesCoverFan` follows the 1 / 2 / 3 / 4+ rules with the next-up work in front, and is used on 5b and 2d.+- [ ] The series page view mode has the fan header, progress, Next up with Continue, and a numbered reading order. Edit mode is unchanged.+- [ ] Unit tests: `WorksGroup` membership (hiatus edge cases), per-group sorts and fallbacks, `SeriesProgress` (next-up, sections, abandoned members), fan cover selection, and token → `WorksFilter` mapping (replace-per-dimension).+- [ ] UI tests updated for the new identifiers. The old `works-list-options-menu` / `works-filter-*` journeys are rewritten against tokens.
diff --git a/docs/agent-notes/works-library.md b/docs/agent-notes/works-library.mdnew file mode 100644index 00000000..891f7754--- /dev/null+++ b/docs/agent-notes/works-library.md@@ -0,0 +1,17 @@+# Works library navigation and search++The Works redesign replaces the root list with a hub. `WorksDestination` is stored under `RestoreStorageKey.worksDestination`; group sorts use `worksGroup.sort.<group>`. All these keys reset on seeded launches.++Compact navigation puts the destination on `AppNavigation.worksPath` before work details. Wide navigation keeps the same route but draws work-list destinations in the list column; `WideRootView.stackDetail` ignores a list destination at the top of the detail stack. Opening a work from the wide list preserves that destination when replacing the detail route. Do not revert the compact row callback to `showWork`: it replaces the path and loses the group's Back destination.++Mac search uses the existing `ColumnSearchField` plus removable tokens and suggestion buttons. It shares `WorksSearchToken` and `WorksFilter` with iOS's native `.searchable` tokens. Choosing a dimension inserts a prefix; choosing a value commits one token per dimension. Normalizing away a dimension suggestion must preserve its prefix even when another token is already active (covered by `dimensionSelection`).++The hub reads the existing series and creator directory models, since filter options exclude empty series and uncredited creators and cannot supply truthful hub totals.++Simulator verification found two integration details: iOS filter choices need explicit `.searchSuggestions` buttons beside `.searchable(text:tokens:)`; the `suggestedTokens` binding alone showed no choices after a dimension prefix on iOS 27. Keep this platform-specific rendering in `Support/PlatformModifiers.swift`, as required by `PlatformSeamTests`. Row helpers also take `SiteNames` from the installed `WorksSearchContent`, since the `WorksView` value passed to a pushed destination is not itself installed in the view tree.++On the iPad simulator, the hub's All works button reports `isHittable == false` despite being enabled and fully visible; a coordinate tap opens the destination. `openAllWorks` bounds that tap to the list column and asserts the resulting screen. Restarting the simulator and disabling hit-testing on the decorative column marker did not change the reported value.++Deferred model work is tracked in [works-redesign-follow-ups](../works-redesign-follow-ups.md).++Dimension suggestion buttons must use `.buttonStyle(.plain)`: the automatic suggestion style dismisses the panel after setting the prefix, leaving the field focused but hiding the value choices. Native `searchCompletion` and explicit suggestion visibility did not keep the panel open. `testEmptySearchOffersAnotherDimensionAfterAToken` exercises the two-stage choice; final value buttons retain the default style.
diff --git a/docs/works-redesign-follow-ups.md b/docs/works-redesign-follow-ups.mdnew file mode 100644index 00000000..60b3909f--- /dev/null+++ b/docs/works-redesign-follow-ups.md@@ -0,0 +1,14 @@+# Works redesign: deferred model changes++Reference: [handover](Asterism-works-redesign.md), §4 and §9.++No persisted model, schema version, migration, or backup format was changed.++- **Status-change timestamps:** defer `workStatusChangedAt` and `readingStatusChangedAt`, including repository writes, snapshot fields, backup/import support and migration tests. On hiatus, Finished and Abandoned currently sort by last note, with unknown dates last. Rows explicitly say “Last noted”, and sort labels describe last-note ordering; neither claims a note date is the date a status changed. Existing records must remain nil when these fields land.+- **Latest-released chapter state / CatchUpProgress:** this checkout does not contain the Today handover's latest-released fields or `CatchUpProgress`. Catching up therefore displays last-note details and “Latest unknown”; its tile reports the work count, and the group describes its fallback sort as “last noted first”. Behind estimates, progress bars, correction controls and the caught-up banner belong with that future model work.++Other integration choices:++- Next-chapter labels reuse `ChapterKeyDerivation` through `SeriesProgress`. Only a single numeric component is incremented. The current URL extraction rules do not provide a reverse URL builder, so Continue uses the handover's primary-work-URL fallback. Missing URLs disable the action.+- A finished work's row counts **notes**, not chapters: the store cannot prove that every chapter has a note. Completed series say “Completed”, without guessing a finish date.+- Empty, wholly abandoned, and abandoned/to-read series remain visible under Not started; they never claim completion. Abandoned members are skipped for Next up.
diff --git a/docs/works-redesign-implementation.md b/docs/works-redesign-implementation.mdnew file mode 100644index 00000000..cf394c73--- /dev/null+++ b/docs/works-redesign-implementation.md@@ -0,0 +1,64 @@+# Works redesign implementation++Implementation of [the Works handover](Asterism-works-redesign.md). The handover and mockup live in `docs`, so this explanation lives alongside them rather than in an unrelated historical spec folder.++## Beginner level++### What changed++Works now opens on a library home with reading groups, Series, Creators and recently noted works. All works still contains the complete library and unattached notes. Search filters appear as removable tokens; choosing another value replaces the previous value for that filter.++### Why it matters++Readers can go straight to their queue or current reading. Series show reading order and the next unfinished work, with covers and progress segments.++### Key concepts++A destination is a place in the library. A token is a filter such as a site or creator. Progress is calculated from existing reading statuses; it does not add stored fields.++## Intermediate level++### Changes overview++`WorksView` renders the hub. `WorksGroupView` and `WorksSearchContent` share list rendering, group membership, sorting and tokens. `WorksSearchToken` maps the eight existing filter dimensions to `WorksFilter`. `SeriesIndexView`, `SeriesCoverFan` and the revised `SeriesDetailView` share `SeriesProgress` from AsterismCore.++### Implementation approach++Compact navigation pushes destinations before detail routes. Wide layouts replace the work-list column for status groups and All works while preserving detail selection. Destination restoration and per-group sort preferences use UserDefaults and reset for seeded test launches. The status sheet reuses the work editor's validation and finished-reading confirmation.++### Trade-offs++The existing repository, snapshots, filter predicates and series editor remain the source of truth. iOS uses native search tokens with explicit suggestion buttons; Mac uses the existing column search field with removable tokens. Continue uses the primary work URL because extraction rules cannot construct chapter URLs in reverse.++## Expert level++### Technical details++Series classification skips abandoned members for Next up and keeps empty or wholly abandoned series reachable. Sorting compares sections first, then dates within In progress and names within other sections. Last-note dates are derived once per progress value. Suggestions use option labels directly and build the value vocabulary only after a dimension prefix. Token identity comes from filter values, so renamed entities and names matching empty-value labels remain distinct.++### Architecture impact++No schema, migration or backup format changes were made. Derived progress belongs in Core; platform-specific token rendering stays in `PlatformModifiers`. Existing row resolution actions, selection marking, first-sync presentation and series editing are retained.++### Potential issues++The review added regressions for mixed-section ordering, colliding token names, token-label refresh, lazy suggestions and adding a second token through empty-field suggestions. Dedicated UI journeys for status-sheet save/cancel, per-group sort persistence and destination restoration remain useful coverage additions. Mac interaction is not covered by simulator tests.++## Completeness assessment++- **Implemented:** hub, status groups, scoped token search, All works with unattached notes, series index and fans, series detail progress and reading order, status action, destination persistence and interim wide-layout routing.+- **Partial by design:** Catching up displays unknown progress; paused, finished and abandoned groups use last-note fallbacks with truthful sort labels. Continue opens the work URL. Finished rows count notes rather than claiming a chapter total.+- **Deferred:** status-change timestamps, latest-released chapter state and `CatchUpProgress`, including schema, backup and migration work. See [follow-up work](works-redesign-follow-ups.md).+- **Outside this handover:** the future iPad/Mac sidebar redesign and creator-page changes.++## Pre-push review verification — 2026-09-25++The review covered the uncommitted working tree against `origin/main`; there were no unpushed commits. Reuse, quality, efficiency and handover checks found and resolved series ordering, token identity/label refresh, thumbnail fallback, misleading fallback sort labels, hidden dimension suggestions and repeated search/progress computation.++- Full `make test-core`: passed after the Core changes.+- `make test-only TEST=AsterismTests`: 1,863 tests in 129 suites passed on the final source.+- Twelve focused iPhone UI tests passed across runs: Series, Works creator/series tokens, hub navigation, sorting, token lifetime, row glyphs and the new two-stage dimension selection journey. This was not the entire UI suite.+- `make verify-identity` and `git diff --check`: passed.+- Fresh `make build-mac`: blocked at signing the Mac share extension with `errSecInternalComponent`. Xcode MCP could not open the worktree without approval through its menu-bar icon. The earlier user-confirmed Mac build predates the review fixes; a new successful Mac build remains required before push.++No commit or push was performed.
The earlier user-confirmed Mac build predates review fixes. CLI signing fails; approve the pending Xcode MCP workspace request to verify through Xcode.
Final app test log: /tmp/asterism-pre-push-final-units.log — 1,863 tests in 129 suites passed. Core: /tmp/asterism-pre-push-core-final.log (successful exit). Focused UI results: /tmp/asterism-pre-push-app.log plus the final dimension-picker pass in /tmp/asterism-pre-push-plain.log. The initial aggregate log contains failures subsequently fixed and rerun. No new test run was needed to render this report.
The ecosystem registry detects only root Swift packages, not this Xcode project. Existing verification used xcresult and logs; no JUnit or coverage export was captured. Reported test counts above are verified log evidence, not fabricated structured inputs.
Dedicated status-sheet save/cancel, per-group sort persistence and restored-destination UI journeys would add coverage. The entire UI suite and Mac interaction were not tested.