Skip to content

0.21.1: a source's page reads its config field by field, never as one line of JSON - #89

Merged
ralyodio merged 3 commits into
mainfrom
source-page-config
Sep 13, 2026
Merged

0.21.1: a source's page reads its config field by field, never as one line of JSON#89
ralyodio merged 3 commits into
mainfrom
source-page-config

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Anthony: "this is pretty bad visual bug", on the page a bulk submission lands on. The config was printed as JSON.stringify(source.config), and the driver hands jsonb over as a string in production, so 167 addresses came out as one line of doubly-escaped JSON.

  • lib/source-config.js: parseJson (string or object, junk is empty), describeConfig(adapter, config) (declared fields in the adapter's order; a list field is a count with the first hundred entries and "and N more"; an undeclared key is pretty JSON), progressOf(cursor, {runCount, enabled}) (the walk cursor as a sentence).
  • The source page renders those instead of the JSON line; lists fold under a <details>, JSON wraps. The edit form parses a string config too and shows list fields one address per line.
  • The route parses config and cursor before rendering.
  • Tests: the describer and the sentence, and the page rendered with a string config and with an object (no escaped JSON, "Addresses: 167 entries", "and 67 more", the progress line, the edit form holding every address).

Version 0.21.1.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MwAoNvWzezmBHeT7oDHo3C

ralyodio and others added 3 commits September 13, 2026 07:55
…ints a list as one line of JSON

A source's config and cursor are jsonb, which the driver hands over as a
string in production; the page printed JSON.stringify of that, so a bulk
list of 167 addresses came out as one line of doubly-escaped JSON. The
page now reads the config the way the adapter declared it: a value as a
value, a list as a count with the entries folded under it (a hundred
shown, the rest counted), an undeclared key as pretty JSON that wraps.
The walk cursor is a sentence: how many pages read of how many, paused,
done, or not started. The edit form takes a string config too and lists
addresses one per line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MwAoNvWzezmBHeT7oDHo3C
@ralyodio
ralyodio merged commit e11831b into main Sep 13, 2026
@ralyodio
ralyodio deleted the source-page-config branch September 13, 2026 07:56
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