Skip to content

feat(ui): revamp house profile overlay UX#919

Merged
cpcloud merged 24 commits intomicasa-dev:mainfrom
cpcloud:worktree-sorted-swinging-crane
Apr 9, 2026
Merged

feat(ui): revamp house profile overlay UX#919
cpcloud merged 24 commits intomicasa-dev:mainfrom
cpcloud:worktree-sorted-swinging-crane

Conversation

@cpcloud
Copy link
Copy Markdown
Collaborator

@cpcloud cpcloud commented Apr 9, 2026

Summary

  • Replace heavyweight huh.Form inline editor with raw textinput.Model rendered directly in grid cells — no prompt character, white text, blinking cursor
  • Abbreviate all overlay field labels for density (Foundation→Fndtn, Wiring→Wire, Square feet→Ft², Bedrooms→Bed, etc.)
  • Add toggle field type for boolean-like fields (basement Yes/No flips on Enter without opening textinput)
  • Align labels as clean two-column tables per section with cursor prefix on focused row
  • Add validate field to houseFieldDef to decouple validation from huh form widgets
  • Forward cursor blink tick messages through main Update loop so textinput cursor animation works
  • Redesign collapsed house header: bold accent text instead of pill, spaced bd/ba/ft² vitals
  • Block scroll events behind overlay, add scroll-blocked test
  • Widen overlay from 90 to 106 columns for three-column layout breathing room

closes #842

🤖 Generated with Claude Code

@cpcloud cpcloud added enhancement New feature or request ux User experience labels Apr 9, 2026
cpcloud and others added 24 commits April 9, 2026 14:31
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>
@cpcloud cpcloud force-pushed the worktree-sorted-swinging-crane branch from b52e8bd to 2cbdade Compare April 9, 2026 18:33
@cpcloud cpcloud merged commit 487d06f into micasa-dev:main Apr 9, 2026
27 checks passed
@cpcloud cpcloud deleted the worktree-sorted-swinging-crane branch April 9, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ux User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ui): revamp house profile overlay UX

1 participant