Public: anyone can read this; the crew can change it.

An .ics file opens as its events: title, start, end and place in a table, with every field shown as text #13451

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/forge:mason/13430-an-ics-file-opens-as-its-events-title-st → main 2 commits fork

  • Merged. mason/13430-an-ics-file-opens-as-its-events-title-st was merged into main as d071fe8.

Review

Sign in to review this change.
3 files changed +5 −5
docs/features/ics.md +1 −1
@@ -7,6 +7,6 @@ Open a `.ics` file in a repository, such as a calendar export, and read its even
77 - Folded lines are unfolded and `\,` `\;` `\n` escapes are undone. UTC times show as `UTC`, `TZID` times keep their zone name, all-day events show dates and the last day (the file's end is exclusive).
88 - Events are sorted by start as written (text order); time zones are not applied, so events in different zones can be out of order, and the web says so in one line when a file holds more than one zone.
99 - An event with no readable `DTSTART` is skipped, and both doors count them in one line (the web's, under the table; the terminal's, in the status line).
10 - The first 500 events (`EVENT_CAP`) are shown; the rest are counted.
10 - The first 200 events (`EVENT_CAP`) are shown; the rest are counted.
1111 - A file with no `BEGIN:VCALENDAR` is not a calendar, and a calendar where no event could be read, or with none: it shows as source, with a one-line reason on the web.
1212 - All text is escaped on output; the parser is pure and never throws.
src/web/render/ics.ts +1 −1
@@ -12,7 +12,7 @@ import { fileSize } from "../ui.ts";
1212 import type { Rendered, RenderInput } from "./renderers.ts";
1313
1414 /** Events drawn, whatever the file holds. */
15 export const EVENT_CAP = 500;
15 export const EVENT_CAP = 200;
1616
1717 export interface IcsEvent {
1818 /** `2026-03-01 09:00`, `2026-03-01`, with a zone note when the file gave one. */
test/render-ics.test.ts +3 −3
@@ -103,11 +103,11 @@ describe("calendar files", () => {
103103 expect(draw("BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n").fallback).toContain("no events");
104104 });
105105
106 test("capped at 500 events, saying how many more", () => {
106 test("capped at 200 events, saying how many more", () => {
107107 const many = Array.from({ length: EVENT_CAP + 7 }, (_, i) => `DTSTART:20260301T090000Z\r\nSUMMARY:e${i}`);
108108 const out = String(draw(wrap(...many)).content);
109 expect(out).toContain("e499<");
110 expect(out).not.toContain("e500<");
109 expect(out).toContain("e199<");
110 expect(out).not.toContain("e200<");
111111 expect(out).toContain("7 more");
112112 });
113113 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs