feat(ui): revamp house profile overlay UX#919
Merged
cpcloud merged 24 commits intomicasa-dev:mainfrom Apr 9, 2026
Merged
Conversation
Design spec for issue micasa-dev#842 — replaces the inline header house profile with a three-column overlay, nickname pill in collapsed header, inline field editing via shared houseFieldDef metadata, and column-major keyboard navigation. closes micasa-dev#842 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove implementation details (Go struct, overlay slice position), add identity field editing, deduplicate identity section description, genericize counts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix misleading "right-aligned" claim — values are left-aligned after label column, not right-aligned within the pair. Also fix nav contradiction (clamp not wrap), simplify inline edit section, add initial cursor position. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nine-task TDD plan covering shared field definitions, form refactor, collapsed header redesign, overlay rendering, keyboard navigation, mouse zones, inline editing, narrow-width stacking, and demo recording. refs micasa-dev#842 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Spec: explicitly define identity as a section in shared field metadata, add acceptance criteria for identity field navigation and editing. Impl plan: use reflection-based completeness test for field defs, fix zone naming to consistent snake_case, clear existing value in edit persist test, add formData field to houseOverlayState. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Completeness test now asserts no extra/stale defs exist without a matching houseFormData field. Spec identity field list names both address line 1 and address line 2 explicitly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace set func with ptr func on houseFieldDef (returns *string for huh binding, eliminates houseFieldPtr indirection) - Fix key binding names to follow overlay pattern (HouseUp/Down/ Left/Right/Close, not CursorDown/HelpClose) - Fix Task 4 test to use Tab close (handleKey not yet implemented) - Add keybindings.go to Task 5 file list - Close code block in Task 7 Step 3 - Move closes micasa-dev#842 from Task 4 to Task 9 - Fix form build call from &values.Field to d.ptr(fd) - Remove redundant showHouse removal in Task 8 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove editing branch and Enter case from Task 5 handleKey (those reference Task 7 code that doesn't exist yet; Task 7 adds them) - Add mouse.go to Task 4 file list and wire-toggle step (header click also toggles showHouse, must update alongside keyboard) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Double-click-to-edit in Task 6 referenced houseOverlayStartEdit() which isn't implemented until Task 7. Changed to a deferred note matching the pattern used for other cross-task references. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Task 4 now includes TestHouseOverlayMouseToggle alongside the keyboard test, covering the mouse.go dispatch path added in the same task. Hint bar defers "enter edit" to Task 7 where inline editing is wired. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TestHouseOverlayMouseToggle now re-gets house-header zone after buildView since opening the overlay can shift zone positions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce houseFieldDef type and ordered slice covering all 27 HouseProfile fields. Each def captures key, label, section, huh.Field builder, getter, and field pointer -- foundation for both the full form and the overlay inline editor. closes micasa-dev#842
startHouseForm now iterates houseFieldDefs() instead of hand-coding each huh.Field. No behavior change — same fields, validators, and groups. Prepares for inline overlay editing. Also adds houseSection.title() method and houseSectionOrder slice, and reorders Identity defs to match existing form tab order (postal code after nickname for autofill). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace House pill with nickname, add bright/dim value hierarchy, k-suffix sqft formatting (2,400 → 2.4k), and ○ N empty field indicator in warning color. Expanded view deduplicates nickname (now in pill, removed from identity line). closes micasa-dev#842
Replace inline expanded header with centered overlay that renders Structure/Utilities/Financial columns with label-value rows and empty field indicators. Implements overlay interface with Tab/Esc key dispatch, registers in overlay stack and dismissActiveOverlay. Removes showHouse field, houseExpanded(), houseArt(), and related dead code. houseView() now always returns collapsed header. closes micasa-dev#842 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Arrow keys and vim bindings (h/j/k/l) navigate within and between sections. Row position is clamped when jumping to shorter columns. Up from top of grid enters identity section; down from identity enters structure. Left/right in identity cycles identity fields. closes micasa-dev#842
Zone-mark every grid field in the three-column overlay so single clicks select the clicked field (section + row). Identity fields remain in the header line without individual zones. Double-click- to-edit is wired in a follow-up task. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enter on a focused field opens a single-field huh.Form in-place using the shared field definitions for widget and validation. Esc cancels, Enter submits and persists to DB. Invalid values show an error in the status bar and keep edit mode active. Extracts saveHouseFormData() from submitHouseForm() so both the full form and overlay inline edit share the same parse-and-save logic. closes micasa-dev#842
Stack overlay sections vertically when terminal is under 80 cols wide instead of cramming three columns into too-small space. Remove unused HouseRoof, HouseWall, HouseWindow, HouseDoor style accessors (pixel art remnants with no callers). closes micasa-dev#842
…gle fields Replace the heavyweight huh.Form inline editor with a raw textinput.Model that renders directly in the grid cell. Abbreviate all overlay field labels for density (e.g. Foundation→Fndtn, Wiring→Wire, Square feet→Ft²). Add toggle support for boolean-like fields (basement Yes/No flips on Enter). Align labels as a clean two-column table per section with cursor prefix on focused row. Forward cursor blink tick messages to the textinput through the main Update loop so the blinking cursor animation works. closes micasa-dev#842 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make the square_feet overlay label dynamic via labelFn — shows Ft² in imperial and m² in metric. Fix textinput width calculation to subtract cursor prefix, padded label, and gap so the editor fits within the column without clipping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verify that all overlay lines stay within the content width when editing at a constrained terminal width near the narrow threshold. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add threshold-boundary and below-threshold cases covering different sections and widths. Compare against houseOverlayWidth (not inner width) since buildHouseOverlay renders the full OverlayBox at that width. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use strings.SplitSeq (modernize), move nolint:unparam to parameter line where the diagnostic fires. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b52e8bd to
2cbdade
Compare
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.
Summary
huh.Forminline editor with rawtextinput.Modelrendered directly in grid cells — no prompt character, white text, blinking cursortogglefield type for boolean-like fields (basement Yes/No flips on Enter without opening textinput)▸cursor prefix on focused rowvalidatefield tohouseFieldDefto decouple validation from huh form widgetscloses #842
🤖 Generated with Claude Code