Skip to content

添削 · correcting a draft, for Rails

Fix your Rails app on the page.

Click any text on a running page and edit it in place. Tensaku writes the change back to the ERB template, the locale YAML or the Markdown file, byte for byte. Or leave a note, and your coding agent gets it with the exact file and line.

Development only. Production keeps rendering with Erubi and never loads Tensaku.

Try it on this page

This is Tensaku's real overlay, running on a small sample app. Here it talks to a stand-in for your Rails server, so the source file on the right changes in your browser instead of on disk.

You're running the docs in development, so this is the real thing: edits are written to app/views/demo/_inbox.html.erb.

  1. Alt-click (⌥-click on a Mac) the heading. Change Welcome back, then press Enter.
  2. Edit from in one message. All three change: it's one line in a loop.
  3. Press Alt+Shift+T, click a message and choose Add note.
  4. Let the agent pick it up, and watch the pin turn green.

On a touch screen, tap the 添 button in the corner, then Edit.

Welcome back, Ada!

You have 3 new messages today.

  • Lunch on Friday? from Grace
  • Draft of the talk from Linus
  • Your invoice from Billing
your app, in development
app/views/demo/_inbox.html.erb
<%# locals: (user:, messages:) %>
<section class="demo-app">
  <header class="demo-app__header">
    <h3>Welcome back, <%= user.name %>!</h3>
    <p>You have <%= messages.size %> new messages today.</p>
  </header>
  <input type="search" placeholder="Search your inbox" aria-label="Search">
  <ul class="demo-app__list">
    <% messages.each do |message| %>
      <li>
        <strong><%= message.subject %></strong>
        <span>from <%= message.sender %></span>
      </li>
    <% end %>
  </ul>
  <button type="button">Open the inbox</button>
</section>
What your agent reads
No open notes. Leave one on the demo, and it shows up here the way your agent reads it.

Edit text in place

The editor shows the source, never the rendered text. Ruby stays as a locked chip, so you change the words around <%= user.name %> and nothing else. Translations, attributes and Markdown blocks work the same way.

Notes with a file and line

Point at an element or drag over an area, and say what should change. Your agent reads the note through MCP, the note files or the clipboard, already knowing where to look.

Production doesn't change

Tensaku lives in the development group. Every write is a splice of exactly the bytes you edited, checked against what the page was rendered from. YAML is never loaded and dumped.

Two commands

# Gemfile
group :development do
  gem "tensaku"
end
bundle install
bin/rails generate tensaku:install

Requires Ruby 4.0 and Rails 8.1 or later. Built on Herb through ReActionView. Read the docs →