Skip to content

fix(calendar): link an empty week to the other two views - #525

Merged
Quick104 merged 2 commits into
mainfrom
fix/issue-513-calendar-empty-links
Sep 28, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/issue-513-calendar-empty-links

Conversation

@Quick104

@Quick104 Quick104 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #513
Related issue: Silo-Server/silo-android#398 (Android counterpart); web counterpart Silo-Server/silo-server#1494
Validation tasks: unblocks #303 C5, #304 C5; touches the tvOS empty-week focus next to #304 C2 (already failing under #514)

When a Calendar week has nothing to show, the empty state offered only Show Everything in Following and Trending. All offered nothing on iPhone and iPad, and Refresh on Apple TV. You couldn't jump to the other filtered view, and Trending and All shared the same generic title. Now the empty state links to the other two views, never the current one, and the title names the view.

Approach

  • Following links to Trending and All. Trending links to Following and All. All links to Following and Trending. The order matches the filter bar, and the labels are the filter-bar names.
  • Trending gets its own title, "Nothing trending this week", worded the same as the web fix. Following and All keep their text.
  • VoiceOver reads the buttons as "Show Trending", "Show All", and so on, so they don't sound like the filter-bar segments.
  • On tvOS the empty state is a full-width focus section. Without it, Down from Monday or Tuesday in the week strip stayed on the strip, because the centered buttons sit only under the middle days. The old single button had the same gap. Up still returns to the strip.
  • Removing Refresh loses nothing: changing week or filter still reloads from the server.

Validation

  • iPhone simulator on shared dev: reproduced all three empty states before the fix. After it, walked All → Trending → Following on empty weeks; each showed the right title and the other two links, and each tap switched view.
  • Apple TV simulator on shared dev: All and Trending empty weeks show the right links. Down reaches the buttons from the Next-week arrow and from Monday, Up returns to the strip, and selecting a link switches view.
  • CalendarFilterTests passes on the iOS simulator. Silo, SiloTV, and SiloMac build.
  • The manual checks ran on the commit before rebasing onto current main; main has no Calendar changes since then. The VoiceOver labels were added after the manual pass and were not checked with VoiceOver.
  • iPad was not checked by hand; it uses the same view as iPhone, with more room.

Evidence: https://evidence.siloserver.org/r/silo-apple/issue-513/

Risks

At the largest accessibility text sizes, "Following" can wrap inside the 150 pt iPhone button. On tvOS, selecting a link swaps in the loading state, so focus goes up to the filter bar. The old button did the same.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

  • Harness: Claude Code (T3 Code)
  • Tool(s): Claude Code, GitHub CLI, Xcode (xcodebuild), XcodeGen, agent-device
  • Model(s): claude-opus-5-5[1m] (Claude Opus 5.5)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: A separate Claude Code subagent (claude-opus-5-5, code-reviewer role) read the change, docs/tvos-focus.md, the surrounding tvOS focus code, and the web fix. It checked the link logic, focus trapping and Up navigation, layout from iPhone SE to tvOS, the macOS build, and VoiceOver labels. It found no blocking issues and two minor ones, both fixed: the link buttons now carry "Show …" accessibility labels, and a comment named the wrong focus neighbour.

🤖 Generated with Claude Code

Note

Link an empty calendar week to the other two views

  • An empty calendar now shows buttons for both alternate filters instead of one action; the previous Everything action and tvOS-only Refresh action are removed in CalendarView.swift
  • Adds CalendarFilter.emptyStateLinks, which returns the two non-active filters in filter-bar order in CalendarModels.swift
  • Gives each filter its own empty-state title and subtitle, including a trending-specific message
  • Covers the new links with a test in CalendarFilterTests.swift
  • Behavioral Change: empty-state button width drops from 360 to 300 points on tvOS and from 220 to 150 on other platforms; empty-state controls now sit in a tvOS focus section

Macroscope summarized 6e1437f.

An empty Calendar week offered only Show Everything in Following and
Trending, and nothing in All (Refresh on tvOS). The empty state now links
to the other two views, never the current one, and the title names the
view ("Nothing trending this week"). On tvOS the empty state is a
full-width focus section so Down from any day in the week strip reaches
the buttons.

Closes #513

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T15:04:59.109963Z 6e1437f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 17aeb7c4-e0af-4ab6-90ad-4966b6a70319

📥 Commits

Reviewing files that changed from the base of the PR and between 6e1437f and b2a328c.

📒 Files selected for processing (3)
  • iosApp/Tests/CalendarFilterTests.swift
  • iosApp/iosApp/Screens/Calendar/CalendarModels.swift
  • iosApp/iosApp/Screens/Calendar/CalendarView.swift

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: dac1d3c7-655b-4659-bac9-3ba18e68f2d6

📥 Commits

Reviewing files that changed from the base of the PR and between 10a7732 and 6e1437f.

📒 Files selected for processing (3)
  • iosApp/Tests/CalendarFilterTests.swift
  • iosApp/iosApp/Screens/Calendar/CalendarModels.swift
  • iosApp/iosApp/Screens/Calendar/CalendarView.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The calendar empty state now offers links to the other two filters. Its title and subtitle distinguish the selected filter. Button labels, focus behavior, and widths are updated.

Changes

Calendar empty-state navigation

Layer / File(s) Summary
Filter links and tests
iosApp/iosApp/Screens/Calendar/CalendarModels.swift, iosApp/Tests/CalendarFilterTests.swift
CalendarFilter.emptyStateLinks returns the other filters in allCases order. Tests verify the links for each filter.
Empty-state actions and text
iosApp/iosApp/Screens/Calendar/CalendarView.swift
The empty state displays a button for each other filter, with updated accessibility labels and platform-specific widths. On tvOS, the content is a focus section. Titles and subtitles distinguish the selected filter.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 6e143

The empty state provides links to the other filters, and tvOS users can reach those controls and reload the current filter by switching away and back. No actionable merge-blocking risk is established; the change is ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: linking an empty calendar week to the other two views.
Description check ✅ Passed The description is directly related to the changeset. It explains the empty-state links, view-specific titles, tvOS focus behavior, validation, and risks.
Linked Issues check ✅ Passed Issue #513 coding requirements are implemented. CalendarFilter.emptyStateLinks returns the other two filters, and CalendarFilterTests verifies all three mappings. CalendarView renders one button…
Out of Scope Changes check ✅ Passed The changed model, view, and test files directly support issue #513. The added test verifies the required filter links. The tvOS focus and button layout changes support the required empty-state naviga…
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Quick104

Copy link
Copy Markdown
Contributor Author

The iOS validate failure is a baseline failure, not from this change. PlayerSurfaceLayoutTests.testMobilePlayButtonIsLargeAndCentredOnThePlayer (added in #521) fails the same way on main at 10a7732, and #526 fixes it. This PR only touches the Calendar empty state and its new test; tvOS, macOS, and the other checks pass. I'll update the branch once #526 merges.

@Quick104
Quick104 merged commit ce17a18 into main Sep 28, 2026
5 checks passed
@Quick104
Quick104 deleted the fix/issue-513-calendar-empty-links branch September 28, 2026 22:18
This was referenced Sep 29, 2026
JonahMMay added a commit to Prairie-Server/prairie-apple that referenced this pull request Sep 29, 2026
Sync upstream silo-apple (2026-09-29): downloads, calendar, watch-party, native settings styling (Silo-Server#525-Silo-Server#546)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar empty state only offers Show Everything, with no link to the other views (iPhone, iPad, Apple TV)

1 participant