Skip to content

v2.3.0 — CSV opens as a table

Choose a tag to compare

@malinborn malinborn released this 05 Oct 15:10
· 3 commits to worktree-csv-tables since this release

couplet 2.3.0

CSV opens as a table.

  • .csv and .tsv are tables now. Open one and the window holds the same table widget markdown gets: edit cells, add and drag rows and columns, and the file is saved back as CSV. The delimiter (, ; or Tab), a BOM and the line endings are read from the file on every save, so an Excel export stays an Excel export. couplet also shows up in Finder's "Open With" for both. couplet edit refuses CSV files for now; show works.
  • Huge CSVs open as text. Above 20,000 rows a CSV opens read-only, with a note saying why. 100,000 rows as a table meant about 1.6 million DOM nodes and a frozen window; a scrolling table that draws only what is on screen is the next step.
  • Big tables got fast. The striped rows used :nth-child(even of …), which WebKit recomputes from scratch for every row — quadratic, 4.6 s of style work on 20,000 rows, now 0.5 s. A cell edit rebuilt the whole table; it now patches the cells that changed: a commit in a 10,000-row table went from 1.7 s to under 0.3 s. Markdown tables render up to 1,000 rows (was 500).
  • The header stays put. Scroll down a long table and its header row sticks to the top of the window until the table ends. It never could: the table clipped its rounded corners with overflow: hidden, which quietly made it the box a sticky header sticks to.
  • Code files, two fixes. A .py (or any code file) opened inside a grey box that vanished on the first click — its style hung on a class the editor rewrites on every focus change. The box is gone for good. And Enter after def f(): indented by two spaces: nothing ever set an indent unit. couplet now reads it from the file (four spaces, two, or tabs), or uses the language's convention when the file has none.
  • Smaller table fixes. Enter off the last visible row no longer opens the next cell's field below the window's edge, and a markdown table too long to render keeps its caret and its search hits instead of throwing the caret out.

Upgrade: brew update && brew upgrade --cask couplet