Skip to content

Toggle time granularity with 't' rather than using 'y' and 't' to switch. Add DAY granularity, refine breadcrumbs#32

Merged
wesm merged 2 commits intomainfrom
time-toggle
Nov 8, 2025
Merged

Toggle time granularity with 't' rather than using 'y' and 't' to switch. Add DAY granularity, refine breadcrumbs#32
wesm merged 2 commits intomainfrom
time-toggle

Conversation

@wesm
Copy link
Owner

@wesm wesm commented Nov 7, 2025

Ongoing UI refinement with the time grouping feature.

wesm and others added 2 commits November 7, 2025 09:39
Simplifies time navigation UX and adds daily granularity support:

**Keybinding Changes:**
- Consolidated 'y' (year) and 't' (month) into single 't' key
- 't' now cycles: Year → Month → Day → Year
- Simpler, more intuitive time navigation

**New Feature - DAY Granularity:**
- View transactions aggregated by day in TIME view
- Navigate between days with arrow keys when drilled in
- Drill into specific days to see transactions
- Combine with sub-grouping (e.g., "2024-03-15 > by Merchant")

**Implementation:**
- Added TimeGranularity.DAY enum value
- Updated state.py to track selected_time_day
- Enhanced data_manager.py for day-level aggregation with gap filling
- Updated formatters.py to display ISO dates (2024-03-15)
- Updated breadcrumb to show day in correct drill-down order
- Added navigate_time_period support for day-to-day navigation

**Documentation:**
- Updated all keyboard shortcut references
- Added screenshot generation for Days view
- Updated README, quickstart, and navigation guides

**Testing:**
- All 912 tests pass
- Added test for DAY → YEAR cycle
- Type checking clean
- Code formatting and linting pass
- Markdown formatting validated

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…formatting

Fixes three issues from commit 74fa329 and adds compact UI formatting:

**Bug Fixes:**
1. Time period formatting now correctly displays Month/Day granularities
   - Was showing only "2024" for all granularities
   - Now shows "Mar 2024" for months, "2024-03-15" for days
   - Fixed by passing day parameter to format_time_period()

2. Hint bar now shows correct time toggle cycle
   - Was showing inconsistent "t=Month" then "y=Year"
   - Now correctly shows: "t=By Month" → "t=By Day" → "t=By Year"
   - Always uses 't' key (removed old 'y' reference)

3. Drilling down into time periods no longer crashes
   - Fixed by #1 above - missing day parameter caused formatting errors

**UX Improvements:**
4. Abbreviated breadcrumb labels for better space usage
   - Changed "Merchant: Amazon" → "M: Amazon"
   - Abbreviations: M:, C:, G:, A:, T: (or first letter of custom labels)
   - Saves ~40-50 characters in multi-level navigation
   - Example: "T: 2024-03-15 > M: Amazon" vs "Time: 2024-03-15 > Merchant: Amazon"

5. Compact stats formatting with abbreviated labels
   - Changed "Income: | Expenses: | Savings:" → "In: | Out: | Net:"
   - Always shows all three values in compact format
   - Fits on narrow terminals (e.g., 120 chars) along with breadcrumb
   - Example: "1,234 txns | In: +$5,000 | Out: -$3,500 | Net: +$1,500"

**Testing:**
- All 912 tests pass
- Updated 12 test assertions for new formats (11 breadcrumb, 1 stats)
- Type checking clean (pyright)
- Code formatting and linting pass (ruff)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@wesm wesm merged commit 6ecce3c into main Nov 8, 2025
6 checks passed
@wesm wesm deleted the time-toggle branch November 8, 2025 13:12
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.

1 participant