Add Schedules page and enhance report builder with period presets#105
Add Schedules page and enhance report builder with period presets#105
Conversation
- Introduced period presets for report generation, allowing users to select predefined time frames such as 'this month', 'last month', 'this quarter', and more. - Implemented logic to calculate start and end dates for each preset. - Updated state management to handle selected presets and their corresponding periods. - Enhanced user experience by automatically applying presets on component mount and when the selected preset changes.
- Reformatted return statements in the buildPresetPeriods function to enhance code clarity by using multiline object syntax. - Adjusted state initialization for selectedPreset and periods for better alignment and readability.
- Updated the report description logic to conditionally display the period dates based on the report type, improving readability and user understanding. - Added support for displaying custom period labels in the StatementTable, ensuring more informative headers for users.
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 1m 45s —— View job PR Review
Overall this is a well-structured PR. The new schedules page is clean, follows existing patterns, and the period presets in the report builder are a useful UX addition. A few issues worth addressing before merge: Issues1. Dead code: unused
2. Bug: underscore replacement only affects first match String(schedule.scheduleMetadata.method).replace('_', ' ')
3. Accessibility: missing label for period-end date input The period-start input has 4. Fragile auto-map polling with hardcoded timeout setTimeout(async () => {
// refresh coverage after 5s
}, 5000)If the AI mapping takes longer than 5 seconds (likely for larger CoAs), the coverage won't reflect the result and 5. { start: `${year}-01-01`, end: `${year}-12-31`, label: `FY ${year}` }If today is April 2026, the current year period ends Dec 31, 2026 — a future date. This may be intentional (for a full fiscal year budget view), but it could produce empty/incomplete results and surprise users who expect it to cover only YTD. Consider whether the end date should be capped at today for the current year, or add a clarifying description like "Full calendar year (may include future months)". 6. await extensions.ledger.createClosingEntry(
graphId,
structureId,
periodEnd, // 3rd arg — "as of" date?
periodStart,
periodEnd // 5th arg — period end
)
Minor Notes
What Looks Good
|
…ntent - Removed the unused formatCurrency function to streamline the code. - Added an aria-label to the period end input for improved accessibility. - Updated the key generation in TableRow to include the index for better uniqueness. - Replaced underscore with space in schedule metadata display for improved readability.
- Added a note in the PR review documentation to clarify the use of `reviews` instead of `reviewers`. - Enhanced the key generation in TableRow within the FactsModal component for better uniqueness by formatting the JSX for improved readability.
Summary
This PR introduces a new Schedules management page under the ledger section and enhances the report builder with period preset functionality. It also includes a dependency update and minor code quality improvements.
Changes
New Features
/ledger/schedules): Added a full-featured schedules management interface with a new content component (~548 lines) and corresponding page entry point. The schedules page is now accessible via the sidebar navigation./reports/new) with period presets functionality, significantly expanding the report builder content (~347 lines of additions/modifications). This allows users to quickly select common date ranges when building reports.Improvements
/reports/[id]/content.tsx) for improved clarity and readability.sidebar-config.tsxto include the new Schedules page link.Dependency Updates
@robosystems/clientfrom previous version to 0.2.44 — this may provide API support required by the new schedules functionality.Housekeeping
src/lib/core/index.ts(9 lines deleted) as part of a module split/reorganization referenced in commit797b6c4.Breaking Changes
src/lib/core/index.ts: Exports have been removed from this barrel file. Any internal imports relying on re-exports from@/lib/coreshould be verified. Downstream consumers of these exports may need to update their import paths.@robosystems/clientupgrade to 0.2.44 may introduce API changes — confirm compatibility with existing API call sites.Testing Notes
Reviewers should verify:
/ledger/schedulesand confirm the page loads correctly/reports/newand verify period preset options are displayed/reports/[id]and verify description formatting renders correctlylib/coremodule reorganizationBrowser Compatibility Considerations
🤖 Generated with Claude Code
Branch Info:
feature/schedulesmainCo-Authored-By: Claude noreply@anthropic.com