Skip to content

feat(lists): open/closed issue filter, smart row headline, tap-to-edit, and GitHub schema - #29

Merged
Adron merged 1 commit into
mainfrom
feat/list-row-display-github-schema
Aug 27, 2026
Merged

feat(lists): open/closed issue filter, smart row headline, tap-to-edit, and GitHub schema#29
Adron merged 1 commit into
mainfrom
feat/list-row-display-github-schema

Conversation

@Adron

@Adron Adron commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

Improves how GitHub-backed lists are browsed and edited, and how list rows render generally. GitHub-backed lists now default to showing open issues with a segmented Open/Closed filter at the top. Rows headline the most meaningful field (not the first column), tapping a row opens view/edit, and GitHub lists get a working dynamic add/edit form now that the schema is available. Pairs with the backend fix that returns the synthetic GitHub schema on GET /api/lists/:id.

What's included

  • Open/Closed issue filter — a segmented control at the top of GitHub-backed list detail filters rows by issue state, defaulting to Open so closed issues are hidden until requested. The filtered-empty case gets its own "No Open/Closed Issues" copy, distinct from the "nothing synced yet" state; local (non-GitHub) lists are unaffected.
  • Smart row headlineDynamicItemRow uses ListPropertyDef.primaryDisplayField(from:) to pick a title/name/subject-like field (else the first editable text field), instead of the first column. For GitHub that was the issue #; with an empty schema it fell back to the alphabetically-first raw field — an assignee (the user) or created_at (a date), exactly the reported symptom. Improved nil fallback prefers title-like values.
  • Tap-to-view/edit — the whole row opens the edit sheet on tap; the inline toggle and expand chevron still capture their own taps; swipe Edit/Close/Delete remain.
  • GitHub list schemaGET /api/lists/:id returned empty properties for GitHub lists (no stored columns), which disabled the add button (.disabled(schema.isEmpty)) and blanked the dynamic add/edit form. The backend now returns the synthetic issue schema (deployed on main); iOS keeps ListPropertyDef.gitHubIssueSchema() as a fallback only when the fetched schema is empty (older/undeployed backend).

Root cause (row/schema symptoms)

getListById (backend) reads properties from the DB, but GitHub lists have no stored listProperty rows — their columns are synthetic issue fields. So iOS received an empty schema, which cascaded into all three symptoms. The durable fix is server-side (now returning the schema); the client fallback is defense-in-depth.

Testing

  • xcodebuild build (iPhone 16 simulator) — BUILD SUCCEEDED
  • xcodebuild test on ListPropertyDefHelpersTests + APIClientListsTests34 passed, 0 failures (7 model + 27 API)
  • New coverage: model tests for the synthetic schema shape + primaryDisplayField heuristic, and an API test decoding the real server GitHub property payload (id: \"gh_<key>\", listId, visibilityCondition, validationRules.options, isReadOnly). The Open/Closed filter is view-layer logic verified by the build.

Caveats / follow-ups

  • Live GitHub flow (add/close/edit real issues, the Open/Closed toggle against real data, tap-to-edit feel) still warrants an on-device pass with a GitHub-linked account — the simulator can't reach a GitHub-backed list.
  • The client gitHubIssueSchema() fallback is intentionally retained as an inert safety net; it can be removed once we're confident every environment runs the updated backend.

🤖 Generated with Claude Code

Three fixes to how list rows render and how GitHub-backed lists edit:

- Smart row headline: DynamicItemRow now uses
  ListPropertyDef.primaryDisplayField(from:) to headline a title/name-like
  field (else the first editable text field), instead of blindly showing the
  first column — which for GitHub was the issue number, and with an empty
  schema fell back to the alphabetically-first raw field (an assignee or a
  timestamp). Applies to all lists.
- Tap-to-view/edit: the whole row opens the edit sheet on tap; the inline
  toggle and expand chevron still capture their own taps; swipe actions remain.
- GitHub list schema: GET /api/lists/:id returned empty `properties` for
  GitHub lists (no stored columns), which disabled the add button and blanked
  the dynamic add/edit form. The backend now returns the synthetic issue schema
  (server is authoritative); iOS keeps ListPropertyDef.gitHubIssueSchema() as a
  fallback only when the fetched schema is empty (older/undeployed backend).

Tests: +7 model tests (synthetic schema shape, primaryDisplayField heuristic)
and +1 API test decoding the real server GitHub property payload
(id "gh_<key>", listId, visibilityCondition, validationRules.options,
isReadOnly). Full unit suite green (801 tests). Docs: CLAUDE.md gotchas updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V16mvNBWyYLncSQL8isDNF
@Adron Adron changed the title feat(lists): smart row headline, tap-to-edit, and GitHub list schema feat(lists): open/closed issue filter, smart row headline, tap-to-edit, and GitHub schema Aug 27, 2026
@Adron
Adron merged commit 035ffd8 into main Aug 27, 2026
1 check passed
@Adron
Adron deleted the feat/list-row-display-github-schema branch August 27, 2026 07:52
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