Skip to content

Technical guide · iOS

Page status: HistoricalHistory group: Classified notes

NutsNews iOS Feature 6 — Reading Stats

This update adds a native Reading Stats screen to the hamburger menu.

Visual overview

Primary diagram

System map

This update adds a native Reading Stats screen to the hamburger menu.

Render the repository-owned system map when you need it.

Diagram is not rendered yet.

View as text
NutsNews iOS Feature 6 — Reading Stats

This update adds a native Reading Stats screen to the hamburger menu.

flowchart TD
  accTitle: NutsNews iOS Feature 6 — Reading Stats
  accDescr {
    This update adds a native Reading Stats screen to the hamburger menu.
  }
  A[User opens hamburger menu] --> B[Select Reading Stats]
  B --> C[Load local AppStorage counters]
  C --> D[Show today's goal and streak]
  C --> E[Show total unique stories and saved count]
  C --> F[Show note count and originals today]
  D --> G[User opens a story]
  G --> H[Increment story-open counters]
  G --> I[Open original story link]
  I --> J[Increment originals-opened counter]
  H --> K[Return to Reading Stats]
  J --> K
  K --> L[Optional clear/reset behavior managed by user action]

NutsNews iOS Feature 6 — Reading Stats

Fullscreen diagram view.

This update adds a native Reading Stats screen to the hamburger menu.

  • Adds Reading Stats to the hamburger menu.
  • Adds a native stats screen showing:
    • Today’s story goal progress.
    • Current positive-news streak.
    • Total unique stories opened.
    • Saved story count.
    • Private note count.
    • Original story opens today.
    • A simple 7-day activity chart.
  • Records a story as opened when the native Article Detail screen appears.
  • Records original story opens when the user taps Open original story.
  • Keeps all stats private on device using @AppStorage.
  • NutsNews/NutsNews/Models/ReadingStatsStore.swift
  • NutsNews/NutsNews/Models/StoryNoteStore.swift
  • NutsNews/NutsNews/Features/Stats/ReadingStatsView.swift
  • NutsNews/NutsNews/Features/Feed/FeedView.swift
  • NutsNews/NutsNews/Features/Article/ArticleDetailView.swift
Terminal window
cd /Users/ramideltoro/nutsnews-ios
zsh ~/Downloads/nutsnews-ios-feature-6-reading-stats/nutsnews_ios_feature_6_reading_stats/scripts/install_feature_6_reading_stats.sh \
~/Downloads/nutsnews-ios-feature-6-reading-stats/nutsnews_ios_feature_6_reading_stats
Terminal window
cd /Users/ramideltoro/nutsnews-ios/NutsNews
xcodebuild \
-project NutsNews.xcodeproj \
-scheme NutsNews \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro Max' \
build
  1. Open the app.
  2. Tap the hamburger menu.
  3. Confirm Reading Stats appears.
  4. Open Reading Stats before opening stories and note the starting values.
  5. Close stats.
  6. Open one story.
  7. Close the story.
  8. Open Reading Stats again.
  9. Confirm today’s count increased.
  10. Open the same story again and confirm the unique count for today does not duplicate the same story.
  11. Open a different story and confirm today’s count increases.
  12. Tap Open original story from a story and confirm Originals today increases.
  13. Save a story and confirm the saved count appears.
  14. Add a story note and confirm the notes count appears.