Skip to content

feat(lists): field validation, help text, add-another-after-saving, From Template tab #50

Description

@Adron

Summary

Four list-authoring affordances the web documents and macOS does not have. None of them needs new API surface beyond what the schema route already accepts — this is mostly editor work.

1. Per-field validation and help text

/help/lists ▸ Schema and fields:

Field types: Text, number, date, email, URL, select, checkbox, and more
Validation: Required fields, min and max values, patterns
Help text: Add hints for each field to guide users

macOS today: SchemaEditorViewModel validates only the field name (non-empty, unique — SchemaEditorViewModel.swift:157–197). ListSchema.swift:6 says nullable and enumValues are "reserved for future", and there is no min / max / pattern / help-text concept anywhere.

⚠️ Probe before designing. The schema DSL is a client convention that is still API-unconfirmed (P2-G in work-consolidation.md: the Field:select(a|b|c) token, delimiter, and whether the server re-emits the option list verbatim). Adding validation metadata to the same DSL string without knowing how the server round-trips it risks silently dropping every rule. Build a list on the web with validation and help text, then read GET /api/lists/{id}/schema and record the actual encoding before writing the editor.

2. "Add another after saving"

/help/lists ▸ Entering several rows in a row:

Next to the Add Row button on the form is an Add another after saving checkbox … saving keeps you on the Add Row screen instead. The row is saved, the form empties, a short confirmation tells you how many rows you have added so far, and the cursor returns to the first field.

Two details the help text is explicit about, both easy to get wrong:

  • The checkbox remembers your choice, across lists and across visits.
  • A rejected save clears nothing — the values stay in the form so the user can fix and retry.

This is a pure keyboard-ergonomics win and fits macOS well.

3. "From Template" tab on New List

/help/lists: "When creating a list, the From Template tab on the New List page lets you start from a pre-defined schema instead of building one field by field."

macOS NewListSheetView has no template tab. (The AI Powered Templates path did ship in PR #31 — this is the non-AI, pre-defined-schema tab, a separate thing.)

4. Repository link and Private-repo tag on GitHub-backed lists

/help/lists: the repository a list came from is linked under the list name (owner/repo issues), and a private repository carries a Private repo tag — "the warning that GitHub will ask them to sign in, or show them a 'not found' page, when they follow the link".

The wire field exists: githubRepoPrivate appears on list rows (seen in the GET /api/lists/watching payload probed 2026-09-07) and is not decoded by the client.

Division of labor

Kit

  • Decode githubRepo / githubRepoPrivate on ListDTO if not already present.
  • Whatever the schema probe turns up for validation metadata.

Domain

  • Extend SchemaField with the validated set once the encoding is known — isRequired, min, max, pattern, helpText — and keep unknown tokens round-tripping untouched so a web-authored rule survives a macOS save.
  • Row-level validation that applies those rules before the network call.
  • A GitHubListSource projection carrying repo slug + private flag.

App

  • SchemaEditorView: per-field validation controls and a help-text field.
  • RowInspectorView / add-row form: surface help text, enforce validation inline, and add the Add another after saving checkbox with a persisted preference plus a running "N rows added" confirmation. Preserve field values on a rejected save.
  • NewListSheetView: a From Template tab.
  • List header: repo link + Private-repo tag for GitHub-backed lists.

Tests

  • happy — a required field with help text saves and validates; add-another keeps the form open and counts up
  • invalid — a value violating min/max/pattern is rejected client-side with the field's own message
  • upstream-failure — a rejected save leaves every typed value intact
  • boundary — a schema authored on the web with rules macOS does not yet model survives a macOS edit untouched

Acceptance criteria

  • Validation rules and help text set on the web are visible and enforced on the Mac, and survive a Mac-side schema edit.
  • Bulk row entry never needs the mouse between rows.
  • Full E2E gate green.

Notes

New findings from the 2026-09-07 parity sweep (items 1–4 were not individually recorded). Item 1 is blocked on the P2-G schema-DSL confirmation; items 2–4 are unblocked and can ship first.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparityWeb-parity gap with the InterlinedList web app

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions