Skip to content

Mark stories read through a form - #1712

Merged
mockdeep merged 1 commit into
mainfrom
rf-mark-read-form
Nov 28, 2026
Merged

mockdeep merged 1 commit into
mainfrom
rf-mark-read-form

Conversation

@mockdeep

Copy link
Copy Markdown
Collaborator

What

When a story opens, the story controller submits a new hidden mark
read form instead of calling the JSON API. The new read action marks
the story read, unless it's kept unread, and responds with a Turbo
Stream that replaces the keep unread form. Its saved state then marks
the story read and updates the unread count.

The tutorial page imitates the mark read form like the others.

Remove helpers/api.ts, the JSON PUT /stories/:id endpoint, and the
sample story check in the story controller.

Why

Last step in moving story updates to server-confirmed forms. The story
controllers no longer talk to the server themselves.

Notes

form_with without a block leaves the form open, which nested the
story's other forms inside it. The mark read form passes an empty
block, and a component spec guards against the nesting.

**What**

When a story opens, the `story` controller submits a new hidden mark
read form instead of calling the JSON API. The new `read` action marks
the story read, unless it's kept unread, and responds with a Turbo
Stream that replaces the keep unread form. Its saved state then marks
the story read and updates the unread count.

The tutorial page imitates the mark read form like the others.

Remove `helpers/api.ts`, the JSON `PUT /stories/:id` endpoint, and the
sample story check in the `story` controller.

**Why**

Last step in moving story updates to server-confirmed forms. The story
controllers no longer talk to the server themselves.

**Notes**

`form_with` without a block leaves the form open, which nested the
story's other forms inside it. The mark read form passes an empty
block, and a component spec guards against the nesting.
@mockdeep mockdeep self-assigned this Nov 28, 2026
@mockdeep
mockdeep enabled auto-merge (squash) November 28, 2026 05:42
@mockdeep
mockdeep merged commit 3f4360d into main Nov 28, 2026
4 checks passed
@mockdeep
mockdeep deleted the rf-mark-read-form branch November 28, 2026 05:45
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