{
  "id": 19895870,
  "title": "Terminal borders that don't cost a cell",
  "url": "https://urgent.news/2026/11/13/terminal-borders-that-dont-cost-a-cell-19895870",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-13T23:06:40.000Z",
  "source": {
    "name": "Hacker News",
    "slug": "hacker-news",
    "url": "https://www.joshka.net/cell-borders/"
  },
  "original_language": "en",
  "account": "Terminal borders are often overlooked, resulting in plain and unappealing user interfaces. This article explores a solution that draws thin lines on the edges of cells instead of using Unicode Box Drawing block characters. The new approach allows for cell borders without taking up a row or column, improving the overall design.\n\nThe author has been working on a terminal protocol that enables this feature, demonstrating its effectiveness by building demo applications with Ratatui. The main advantage of cell borders is that they reside within each cell, unlike box-drawing characters which occupy a whole cell and bring various drawbacks.\n\nCell borders can be styled individually, with their own color, width, placement, and style, allowing for more flexibility and customization. They also handle scrolling, erasing, inserting, and reflowing with the text, similar to background colors. The proposed approach also supports lines in different styles, such as solid, double, dashed, or dotted, and cell corners can be either square or rounded with configurable radii and anti-aliased arcs.\n\nBy storing borders in cells, they automatically adjust with text scrolling, erasing, inserting, and reflowing, eliminating the need for additional space. The author demonstrates the practical benefits of this method through various examples, including nested panels, charts, tables, and dialogues. The border merging feature ensures that focused panes maintain their outlines, even when neighboring cells put lines on shared edges.\n\nThe implementation relies on a single Data Control String (DCS) with a namespace, simplifying the process and providing a common path for setting the pen (cell borders) and printing text. A capability query allows apps to check if the terminal supports cell borders, and if not, the application can fallback to using box-drawing characters.\n\nIn conclusion, cell borders offer a more efficient and visually appealing approach to terminal interfaces, providing a seamless and clutter-free user experience.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}