Inline sub category assignment - #28
Merged
Merged
Conversation
Covers the UI spec for the uncategorized-row cell, the new PATCH endpoint and assigner service, the progressive-enhancement frontend, functional and unit test cases, the dependency decision (none), and the performance and security implications. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q1NqsuwvBdHz19hkzKKmie
Drop undo from the UI and the endpoint. The select is removed from the DOM on save and the cell settles into the same markup a server-rendered categorized row produces, so a reload shows no visual change. The assigner now takes a non-nullable SubCategory, so the set-only rule is enforced by the type signature rather than by a runtime check. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q1NqsuwvBdHz19hkzKKmie
Uncategorized rows now render a sub category select scoped to the transaction type and grouped by top category. Choosing one saves it over fetch and settles the cell into the same markup a categorized row renders server-side, so a reload shows no change. The cell is a real form with a submit button that the module hides on init, so the feature degrades to a normal form submit if the script fails, and is reachable from WebTestCase, which runs no javascript. The endpoint is set-only: an empty or unknown sub category is rejected rather than treated as a request to clear. Assignments are validated before the flush, because Transaction::checkSubCategory() throws a raw exception from a PreUpdate callback on a type mismatch. The list query now selects account and subCategory, and the sub categories are fetched before the filter form view is built so its group_by finds the top categories in the identity map. The page drops from 34 queries to 8. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q1NqsuwvBdHz19hkzKKmie
Three separate causes made columns and rows move as a category was picked and saved: - the select was auto width, so it resized to fit the selected option - the save markers added inline width, the error message most of all - the cell lost height when the form was replaced by plain text The select and the column now have fixed widths, markers are truncated with the full text kept in a title attribute, and every cell reserves the height of a select. Columns and row heights are identical across the idle, picked, saving, settled and error states. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q1NqsuwvBdHz19hkzKKmie
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.
No description provided.