Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions GOALS_FIGMA_MAKE_PROMPT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Figma Make prompt: Papyrus Goals

Design a new Goals experience for **Papyrus**, a cross-platform book library and reader for physical and digital books. The purpose is to help people understand their reading progress and build a reading habit. Make it feel like a thoughtful part of a reading app: clear, calm, approachable, and easy to use.

Focus on the visual design and overall experience. You have freedom to rethink the composition, hierarchy, and interactions. Do not turn this into a dense dashboard or an exhaustive feature specification.

## Design style

Use **modern, minimal product design grounded in Material Design 3**, with the warmth and restraint of a well-designed reading app. Favor clean sans-serif typography, clear hierarchy, generous but deliberate spacing, subtle surface differences, and consistent rounded controls. Use simple outline icons from one coherent icon family.

The result should feel polished and practical. Avoid decorative gradients, glass effects, oversized statistics, excessive shadows, motivational slogans, and unnecessary visual clutter. Let typography, alignment, and spacing do most of the work.

Choose a cohesive layout rather than forcing every piece of content into a card. Where you use repeated cards or controls, keep their proportions and alignment consistent. Buttons should fit their purpose and labels; short inputs should not stretch across a large desktop panel. Keep activity information easy to scan without repeating long book titles unnecessarily.

## Colors and themes

Provide **Light and Dark** versions using the same visual language and layout. Use Papyrus’s existing palette:

| Role | Light | Dark |
| --- | --- | --- |
| Primary accent | `#5654A8` | `#C3C0FF` |
| Text on primary | `#FFFFFF` | `#272377` |
| Background | `#FFFBFF` | `#1C1B1F` |
| Main text | `#1C1B1F` | `#E5E1E6` |
| Secondary text | `#47464F` | `#C8C5D0` |
| Subtle borders | `#C8C5D0` | `#47464F` |
| Soft accent surface | `#E2DFFF` | `#3E3C8F` |

Use purple sparingly to guide attention and indicate selection. Keep most surfaces neutral and maintain readable contrast. Also show how the design adapts to a high-contrast, grayscale e-ink display with solid surfaces and minimal motion.

## Cross-platform design

This is a **Flutter application for Android, iOS, web, Windows, macOS, and Linux**. Design it as one coherent product that adapts naturally to phones, tablets, and desktops, rather than a desktop dashboard squeezed onto a phone.

Show representative phone, tablet, and desktop layouts. Account for touch, mouse, keyboard, visible focus, larger text, and system safe areas. Use bottom navigation on phones and sidebar navigation on wide screens as surrounding app context. Adapt secondary interactions to suitable mobile sheets and desktop dialogs or panels. Keep essential actions easy to reach without consuming excessive space.

## Deliverable

Create a visually convincing, interactive prototype of the Goals experience, including a representative overview, an activity/history view, and a secondary interaction that demonstrates the shared component style. Use concise, natural copy and realistic sample content, including a long book title, to demonstrate a balanced layout.

Prioritize visual coherence, readability, and a strong responsive composition over the number of features shown. Establish a reusable typography, spacing, surface, and control system that could also guide the rest of Papyrus.
44 changes: 44 additions & 0 deletions GOALS_INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Goals integration

The coordinated `feat/goals-redesign` branches target `development` in reader,
server, client, and this workspace. No component version changes are included.

The reader exposes generic observations; the client owns durable foreground
tracking, goal projections, and the adaptive Goals interface; the server validates
owned immutable activity and synchronizes rule/period history. Detailed contracts
and local validation commands live in:

- `reader/docs/integration.md`
- `client/docs/goals-tracking.md`
- `server/docs-tracking.md`

Merge the reader change before the client uses its committed revision. Merge the
server alongside the client, and deploy its migration/publication/PowerSync streams
and advertised tracking capability before the integrated client release. Merge
workspace pins after their component PRs. Use the established development-to-master
release workflow when ready; this work does not trigger a version-based release.

## Coordinated changes

- [Reader #5](https://github.com/PapyrusReader/reader/pull/5): generic activity observations, committed revision `bc617deeaf2ae684f20c1000ed7cd52f9a61d0a7`.
- [Server #12](https://github.com/PapyrusReader/server/pull/12): owned ledger and tracking capability, committed revision `91a1612a0c650f07ce0d7e3fe5266efe3969eeaa`.
- [Client #40](https://github.com/PapyrusReader/client/pull/40): Goals and durable foreground tracking, committed revision `6fa232c0b4eeacd293d17126907cd932b843a05e`.

## Validation evidence

Final client integration: 1,541 tests passed, 19 skipped; final focused identity,
tracker, and persistence checks: 11 passed. Final goal replacement, deadline, UI,
projection, and persistence regressions: 41 passed. Analysis, formatting, bootstrap tests,
and production web build passed. Android and Chromium host checks exercised real
EPUB/PDF reading, durable checkpoints, exposed coverage, and pause/exit behavior.
Light/dark/e-ink Goals and fixed-footers were inspected at phone, tablet, desktop,
and enlarged text sizes. Screenshots are in the client tracking documentation.

Reader package: 145 tests passed; package/example checks, web build, browser
smoke checks, and worker drift passed. Server: 39 focused route/service/migration
checks and the final 12 aggregation/ownership regressions passed; Ruff, formatting,
and Mypy passed. Migration tests preserve pre-existing data.

Shared aggregation fixtures cover concurrent-device overlap and coverage. Live
two-device PowerSync transport was not exercised; this remains an opt-in check
with configured services, rather than a claim implied by local database tests.
2 changes: 1 addition & 1 deletion client
Submodule client updated 68 files
+2 −2 .github/workflows/ci.yml
+1 −1 .github/workflows/release-checks.yml
+58 −0 app/integration_test/reading_tracking_test.dart
+154 −0 app/integration_test/support/tracking_app.dart
+201 −24 app/lib/data/data_store.dart
+9 −0 app/lib/data/repositories/library_repository.dart
+23 −0 app/lib/data/repositories/tracking_repository.dart
+91 −0 app/lib/goals/goal_calendar.dart
+187 −0 app/lib/goals/goal_progress.dart
+59 −0 app/lib/goals/reading_activity_calendar.dart
+18 −0 app/lib/main.dart
+15 −0 app/lib/models/goal_period_record.dart
+170 −0 app/lib/models/reading_activity.dart
+156 −176 app/lib/models/reading_goal.dart
+3 −0 app/lib/models/reading_session.dart
+590 −274 app/lib/pages/goals_page.dart
+142 −4 app/lib/pages/reader_page.dart
+132 −1 app/lib/powersync/library_database.dart
+4 −1 app/lib/powersync/library_row_mapper.dart
+24 −2 app/lib/powersync/papyrus_powersync_connector.dart
+20 −0 app/lib/powersync/papyrus_schema.dart
+32 −2 app/lib/powersync/powersync_service.dart
+1 −3 app/lib/providers/book_details_provider.dart
+18 −21 app/lib/providers/dashboard_provider.dart
+307 −162 app/lib/providers/goals_provider.dart
+102 −89 app/lib/providers/statistics_provider.dart
+3 −5 app/lib/reader/reader_book_adapter.dart
+16 −4 app/lib/reader/reader_session.dart
+177 −0 app/lib/reader/reading_activity_tracker.dart
+19 −0 app/lib/services/reading_device_identity.dart
+39 −36 app/lib/widgets/auth/auth_page_layouts.dart
+0 −579 app/lib/widgets/goals/active_goal_details_sheet.dart
+488 −416 app/lib/widgets/goals/add_goal_sheet.dart
+0 −494 app/lib/widgets/goals/completed_goal_chip.dart
+214 −238 app/lib/widgets/goals/goal_card.dart
+29 −0 app/lib/widgets/goals/goal_controls.dart
+192 −0 app/lib/widgets/goals/goal_details_sheet.dart
+93 −0 app/lib/widgets/goals/goal_timezone_picker.dart
+504 −0 app/lib/widgets/goals/log_reading_sheet.dart
+338 −0 app/lib/widgets/goals/reading_activity_heatmap.dart
+172 −0 app/lib/widgets/goals/reading_activity_timeline.dart
+4 −0 app/linux/flutter/generated_plugin_registrant.cc
+1 −0 app/linux/flutter/generated_plugins.cmake
+2 −0 app/macos/Flutter/GeneratedPluginRegistrant.swift
+21 −5 app/pubspec.lock
+4 −1 app/pubspec.yaml
+562 −0 app/test/goals/fixtures/projections.json
+67 −0 app/test/goals/goal_progress_test.dart
+112 −0 app/test/goals/goals_provider_test.dart
+68 −0 app/test/goals/reading_activity_calendar_test.dart
+106 −2 app/test/pages/goals_page_test.dart
+5 −2 app/test/powersync/papyrus_schema_mode_test.dart
+180 −0 app/test/powersync/tracking_persistence_test.dart
+2 −2 app/test/providers/book_details_provider_test.dart
+157 −0 app/test/reader/reading_activity_tracker_test.dart
+32 −0 app/test/widgets/auth/auth_page_layouts_test.dart
+153 −0 app/test/widgets/goals/goal_details_sheets_test.dart
+387 −0 app/test/widgets/goals/goals_ui_refinement_test.dart
+13 −2 app/test/widgets/shared/bottom_sheet_expansion_test.dart
+9 −1 app/test/widgets/shared/bottom_sheet_layouts_test.dart
+3 −0 app/test_driver/reading_tracking_driver.dart
+43 −0 app/tool/preview_goals.dart
+3 −0 app/windows/flutter/generated_plugin_registrant.cc
+1 −0 app/windows/flutter/generated_plugins.cmake
+12 −0 docs/RELEASING.md
+90 −0 docs/goals-tracking.md
+ − docs/images/goals-desktop.png
+ − docs/images/goals-mobile.png
Loading