Closed
Add hide-toggle UI blocks for budgets and categories in Control page#85
Conversation
Copilot
AI
changed the title
[WIP] Add UI for hide toggle budgets functionality
Add hide-toggle UI blocks for budgets and categories in Control page
Jun 13, 2026
Billos
marked this pull request as ready for review
June 13, 2026 14:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hide-toggle endpoints from PR #84 (
/hide-toggle/budget/:name,/hide-toggle/category/:name) had no UI surface — and also contained two bugs that would have prevented them from working at all.Bug fixes
:budgetId/:categoryIdbut handlers accessedreq.params.budgetName/req.params.categoryName→ alwaysundefined. Renamed route params to match.next()with no subsequent middleware, resulting in a 404 on every toggle call. Changed tores.json({ hidden, budgetName|categoryName }).Backend (
controlPage.ts)Fetches budgets, categories, and both hidden lists from Redis in parallel before rendering:
Frontend (
control.pug+style.css).itemsblocks — Hide Toggle Budgets and Hide Toggle Categories — each rendering a button per item with its current state (👁️ visible / 🙈 hidden)GET /hide-toggle/{type}/{name}?api_token=TOKENand updates the button visually without page reloadtypeis validated client-side as'budget'or'category'before URL construction to prevent path traversal.toggle-button,.visible-item,.hidden-item