Skip to content

Remove deprecated mapping pages and streamline ledger navigation#95

Merged
jfrench9 merged 1 commit intomainfrom
refactor/cleanup-old-mapping-pages
Mar 31, 2026
Merged

Remove deprecated mapping pages and streamline ledger navigation#95
jfrench9 merged 1 commit intomainfrom
refactor/cleanup-old-mapping-pages

Conversation

@jfrench9
Copy link
Copy Markdown
Member

Summary

This PR removes the legacy account mappings and mappings pages from the ledger section, eliminating ~1,865 lines of unused code. The trial balance page is updated to link to the Chart of Accounts instead of the now-removed Mappings page, providing a cleaner and more intuitive navigation flow.

Changes

Removed

  • /ledger/account-mappings — Deleted both the page and content component (890+ lines), which provided account mapping management UI
  • /ledger/mappings — Deleted both the page and content component (680+ lines), which provided general mapping management UI
  • src/lib/ledger/queries.ts — Removed 259 lines of associated query/data-fetching logic that exclusively served the deleted mapping pages

Modified

  • src/app/(app)/ledger/trial-balance/content.tsx — Updated navigation link to point to Chart of Accounts instead of the removed Mappings page
  • src/lib/ledger/index.ts — Removed re-exports of deleted query functions to keep the module's public API clean

Key UI/UX Improvements

  • Simplified navigation: Users are now directed to the Chart of Accounts from the trial balance view, which is a more relevant and actively maintained destination
  • Reduced cognitive load: Removing deprecated mapping pages eliminates potential confusion for users who might land on outdated functionality

Breaking Changes

⚠️ Yes — the following routes are no longer accessible:

  • /ledger/account-mappings
  • /ledger/mappings

Any bookmarks, external links, or internal references pointing to these routes will result in a 404. If there are other parts of the application (e.g., sidebar navigation, breadcrumbs, or other page links) that reference these routes, they should be verified and updated accordingly.

Additionally, any consumers importing from src/lib/ledger that relied on the removed query functions will encounter build errors.

Testing Notes

  • Verify the trial balance page renders correctly and the "Chart of Accounts" link navigates to the correct destination
  • Confirm no remaining references to /ledger/account-mappings or /ledger/mappings exist in navigation menus, sidebars, or other components
  • Run a full build (next build) to ensure no broken imports from src/lib/ledger
  • Search the codebase for any remaining references to the deleted query functions (e.g., grep for function names that were in queries.ts)
  • Verify no other pages or API routes depend on the removed query logic

Browser Compatibility

No browser compatibility concerns — this PR only removes pages and updates a link href. No new browser APIs, CSS features, or client-side behavior is introduced.


🤖 Generated with Claude Code

Branch Info:

  • Source: refactor/cleanup-old-mapping-pages
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

…on, streamlining the codebase. Update trial balance content to link to the Chart of Accounts instead of Mappings for improved navigation.
@jfrench9 jfrench9 merged commit 088484f into main Mar 31, 2026
3 checks passed
@jfrench9 jfrench9 deleted the refactor/cleanup-old-mapping-pages branch March 31, 2026 17:38
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