Skip to content

Add separate toggles for Goal Tracking, Daily Score, and Tasks#5295

Merged
mdmohsin7 merged 4 commits intomainfrom
feat/separate-home-screen-toggles
Mar 10, 2026
Merged

Add separate toggles for Goal Tracking, Daily Score, and Tasks#5295
mdmohsin7 merged 4 commits intomainfrom
feat/separate-home-screen-toggles

Conversation

@krushnarout
Copy link
Member

@krushnarout krushnarout commented Mar 3, 2026

Summary

  • Adds individual developer setting toggles for Goal Tracking (goals widget), Daily Score, and Tasks on the home screen
  • Previously all three were bundled under a single "Goal Tracker" toggle with no way to control them independently
  • Each widget now respects its own toggle: turning one off no longer hides the others

closes #5074

Demo

ScreenRecording_03-03-2026.10-04-41_1.MP4

Changes

  • preferences.dart: Added showDailyScoreEnabled and showTasksEnabled SharedPreferences keys (both default true)
  • developer_mode_provider.dart: Added fields, initialize() loading, saveSettings() persistence, and onShowDailyScoreChanged / onShowTasksChanged handlers
  • developer.dart: Added two new experimental toggles — Daily Score (chart-line icon) and Tasks (list-check icon) — after the existing Goal Tracker toggle
  • conversations_page.dart: Each widget (DailyScoreWidget, TodayTasksWidget, GoalsWidget) now checks its own individual flag before rendering
  • l10n: Added showDailyScoreOnHomepage and showTasksOnHomepage keys with translations in all 33 non-English locales

Test plan

  • Open Developer Settings → Experimental section — three separate toggles appear: Goal Tracker, Daily Score, Tasks
  • Toggle off Daily Score → score gauge disappears, tasks and goals still show
  • Toggle off Tasks → task list disappears, score and goals still show
  • Toggle off Goal Tracker → goals widget disappears, score is also hidden (score depends on goal tracker being on)
  • Toggle all three off → home screen shows no widgets
  • All states persist across app restarts

🤖 Generated with Claude Code

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 3, 2026

Greptile Summary

This PR successfully adds separate toggles for Goal Tracking, Daily Score, and Tasks widgets on the home screen, replacing the previous single bundled toggle. The implementation follows existing patterns in the codebase and includes proper state management, persistence, and localization across all 33 supported languages.

Key improvements:

  • Added showDailyScoreEnabled and showTasksEnabled SharedPreferences keys (both default true)
  • Updated DeveloperModeProvider with proper initialization, state management, and immediate persistence
  • Added two new experimental toggles in Developer Settings UI with appropriate icons
  • Updated conversations_page.dart to conditionally render each widget based on individual flags
  • Proper l10n implementation with translations in all supported locales

Note: Daily Score widget has an intentional dependency on Goal Tracker being enabled (as documented in the test plan). This means toggling Daily Score on won't show the widget if Goal Tracker is off, which might not be immediately obvious to users.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • Clean implementation following existing patterns, proper state management and persistence, comprehensive l10n, and straightforward conditional rendering logic. Minor UX consideration about Daily Score dependency is intentional per test plan.
  • No files require special attention - implementation is consistent and well-structured

Important Files Changed

Filename Overview
app/lib/backend/preferences.dart Added showDailyScoreEnabled and showTasksEnabled preference keys with proper getters/setters, both defaulting to true
app/lib/providers/developer_mode_provider.dart Added state fields, initialization loading, immediate persistence in onChange handlers, and redundant saving in saveSettings()
app/lib/pages/settings/developer.dart Added two new experimental toggles (Daily Score and Tasks) with appropriate icons and l10n strings
app/lib/pages/conversations/conversations_page.dart Updated widget rendering logic with individual flag checks; Daily Score widget has dependency on both showGoalTrackerEnabled AND showDailyScoreEnabled

Last reviewed commit: f7b5caa

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

73 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@krushnarout krushnarout force-pushed the feat/separate-home-screen-toggles branch from f7b5caa to 300d943 Compare March 3, 2026 03:34
@krushnarout krushnarout linked an issue Mar 3, 2026 that may be closed by this pull request
@krushnarout krushnarout requested a review from mdmohsin7 March 5, 2026 08:30
@mdmohsin7
Copy link
Member

resolve conflicts pls @krushnarout

krushnarout and others added 3 commits March 8, 2026 23:25
Daily Score widget only uses GoalsProvider for the CTA button label
(Add Goals vs New Task) — the score itself is purely task-based.
Remove the hidden dependency so each of the three toggles works
independently. Also pass null for goalsWidgetKey when Goal Tracker
is off so the Add Goals button gracefully falls back to New Task.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@krushnarout krushnarout force-pushed the feat/separate-home-screen-toggles branch from 7f6cb17 to ea48d25 Compare March 8, 2026 18:01
@krushnarout
Copy link
Member Author

krushnarout commented Mar 8, 2026

resolve conflicts pls @krushnarout

resolved conflicts, please review @mdmohsin7

beastoin
beastoin previously approved these changes Mar 10, 2026
Copy link
Collaborator

@beastoin beastoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by @ryo (community PR reviewer)

Clean, well-structured PR. Code follows existing patterns throughout.

What's good:

  • Preferences, provider, and UI all follow the exact same pattern as the existing showGoalTrackerEnabled toggle — no surprises
  • Proper l10n across all 33 locales with correct ARB metadata in app_en.arb
  • Smart DailyScoreWidget(goalsWidgetKey: showGoals ? _goalsWidgetKey : null) — handles the dependency correctly
  • conversations_page.dart properly early-returns when all three are off, and individually wraps each widget with its flag
  • Has demo video showing all toggle combinations working

One minor note: @mdmohsin7 asked for conflict resolution — contributor has resolved it. Branch should be current.

Recommendation: Safe to merge.

@beastoin beastoin dismissed their stale review March 10, 2026 01:50

Withdrawing review — re-reviewing after internal discussion.

@mdmohsin7 mdmohsin7 merged commit 7b60f13 into main Mar 10, 2026
1 check passed
@mdmohsin7 mdmohsin7 deleted the feat/separate-home-screen-toggles branch March 10, 2026 14:25
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.

Separate Toggles for Goal Tracking, Daily Score, and Tasks

3 participants