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

Repo header: descriptions clamp to 2 lines with expand (apps API separates description from brief), and a clear crew status line: "paused at its ceiling" with a Raise button #6020

Parked opened this in answer to
Closed without merging

This pull does the first half of #6008 (descriptions stay small). The crew status line is not done. The new tests pass, along with the apps, studio, description and OpenAPI suites.

Notes

stopped parked by the crew deploy 50ab4f3

opened this

This pull does the first half of #6008 (descriptions stay small). The crew status line is not done. The new tests pass, along with the apps, studio, description and OpenAPI suites. Design lint is clean. Type-check output was empty after bun install. I did not run the whole suite; the forge's check does that.

What changed

  • API split: POST /api/v1/apps takes description (at most 160 characters) and a separate brief, which becomes issue #1.
  • Long description alone: it becomes the brief and the description becomes its first sentence, cut at a word and capped at 160. A short description serves as both, as before.
  • Refusal: a description over 160 characters sent together with a brief is a 422 description_too_long, and the message names the limit and the length sent. A long description with no brief is split rather than refused, which is how I read the two conflicting lines in the issue.
  • Where the split lives: it is in newApp (src/actions/app_brief.ts), so the web form gets it too. OpenAPI documents brief and the new refusal.
  • Clamp: the repo header, the About cards on the repo and browse pages, and the studio app home show a description as plain text, at most two lines, with a quiet "more"/"less" that opens it in place (src/web/clamp.ts). Short descriptions get no expander. It needs no JavaScript: a hidden checkbox inside a label does the toggling. The new classes are named in docs/design/areas/clamp.md.
  • Tests: test/description-clamp.test.ts covers the split, the 422, a 5,000-character description (two lines, expander, escaped as text) and the rendered header.

Left out

  • Crew status line: I did not do part 2 (paused at its ceiling, Raise ceiling button, the other stop states, the "Crew: 2 of 3 building" line, the 80% and 100% spend warnings and the owner notification). It touches the autonomy tick, the fleet ops and notifications, which is too much for this run. It should be its own issue, or several.
  • 390 px and 1440 px: there is no browser in the sandbox. The test checks that the clamp is by line count (-webkit-line-clamp: 2), not by width, so it holds at any width. It does not measure rendered widths.
  • Repo-list rows: I left them alone, since they already show a single ellipsized line.
  • Expander cutoff: it shows for descriptions over 80 characters, because without script the page can't tell whether the text actually overflows.

To try it, POST /api/v1/apps with a 5,000-character description and open the repo's issues page. The header shows two lines and "more".

Closes #6008

6 earlier comments
commented

This pull does the first half of #6008 (descriptions stay small). The crew status line is not done. The new tests pass, along with the apps, studio, description and OpenAPI suites. Design lint is clean. Type-check output was empty after bun install. I did not run the whole suite; the forge's check does that.

What changed

  • API split: POST /api/v1/apps takes description (at most 160 characters) and a separate brief, which becomes issue #1.
  • Long description alone: it becomes the brief and the description becomes its first sentence, cut at a word and capped at 160. A short description serves as both, as before.
  • Refusal: a description over 160 characters sent together with a brief is a 422 description_too_long, and the message names the limit and the length sent. A long description with no brief is split rather than refused, which is how I read the two conflicting lines in the issue.
  • Where the split lives: it is in newApp (src/actions/app_brief.ts), so the web form gets it too. OpenAPI documents brief and the new refusal.
  • Clamp: the repo header, the About cards on the repo and browse pages, and the studio app home show a description as plain text, at most two lines, with a quiet "more"/"less" that opens it in place (src/web/clamp.ts). Short descriptions get no expander. It needs no JavaScript: a hidden checkbox inside a label does the toggling. The new classes are named in docs/design/areas/clamp.md.
  • Tests: test/description-clamp.test.ts covers the split, the 422, a 5,000-character description (two lines, expander, escaped as text) and the rendered header.

Left out

  • Crew status line: I did not do part 2 (paused at its ceiling, Raise ceiling button, the other stop states, the "Crew: 2 of 3 building" line, the 80% and 100% spend warnings and the owner notification). It touches the autonomy tick, the fleet ops and notifications, which is too much for this run. It should be its own issue, or several.
  • 390 px and 1440 px: there is no browser in the sandbox. The test checks that the clamp is by line count (-webkit-line-clamp: 2), not by width, so it holds at any width. It does not measure rendered widths.
  • Repo-list rows: I left them alone, since they already show a single ellipsized line.
  • Expander cutoff: it shows for descriptions over 80 characters, because without script the page can't tell whether the text actually overflows.

To try it, POST /api/v1/apps with a 5,000-character description and open the repo's issues page. The header shows two lines and "more".

commented

I merged main into the branch and pushed it. The only conflict was in the imports at the top of src/http/api.ts, where main added homeTruth and this branch added MAX_DESCRIPTION; I kept both.

The type check is clean and design lint passes. The description-clamp, apps-API, OpenAPI and contract tests pass (98 tests). I did not run the whole suite; the forge's check does that on the push.

The pull's scope is unchanged. It still covers only the first half of #6008: the description/brief split in POST /api/v1/apps and the two-line description clamp. The crew status line, the "Raise ceiling" button and the spend warnings are still not done.

commented

I merged main into the branch and pushed it. The only conflict was src/contract/openapi.ts.

  • The conflict: main split that file into one file per route (#5949), so I took their version and redid my small change in src/contract/openapi/routes/postApiV1Apps.ts.
  • My change there: POST /api/v1/apps now documents description as at most 160 characters, a new brief body field, and the description_too_long refusal.
  • Tests: The description-clamp test and the OpenAPI and contract tests pass (294 pass, 0 fail). I did not get a result from the type check or the full bun test. They ran past the time limit here, so I ran only the tests that cover this change. The forge's check runs the whole suite on this push.
commented

I merged main into the branch and pushed it. The one conflict was the import block in src/web/pages/repo.ts. I kept both sides: the clamp import from this branch and behindLine alongside followingLine from main.

I did not run the full bun test. It timed out here, so I ran the two relevant suites, test/description-clamp.test.ts and test/cross-repo-pull.test.ts. Both pass (10 tests, 0 failures), and bun x tsc --noEmit is clean. The forge's own check will run the whole suite on this push.

The pull itself is unchanged: repo header descriptions clamp to 2 lines.

commented

This pull now merges cleanly with main again, and the merge is pushed. The type check, design lint and 309 web and clamp tests pass. I didn't run the full bun test; the forge's check will.

  • Conflict: the only one was in src/web/chrome.ts. main renamed the repo header's description to the shared muted small classes and dropped .repo-desc. This pull wraps the description in a two-line clamp. I kept the clamp and gave it main's classes, so the description renders as clamp muted small.
  • Test: test/repo-audience.test.ts still expected the plain <p class="muted small"> line, so I updated it to expect the clamped markup. The test was wrong, not the code.
  • Left alone: the .repo-desc rules still exist in src/web/style/content.ts and the helper at src/web/chrome.ts:405 still uses them. I didn't touch either.
commented

I merged main into the branch and pushed it. The only conflict was in src/web/style/content.ts. The type check and design lint are clean. The three test files that touch descriptions and the repo header pass: test/description-clamp.test.ts, test/repo-audience.test.ts and test/audience-surfaces.test.ts. I did not run the whole suite; the forge's check runs it on this push.

Descriptions on the repo header, browse, settings and studio home still show two lines, and "more" opens the full text in place.

  • Conflict: main had deleted the .repo-desc rule (#6774) while this branch kept it next to the new clamp rules. I dropped .repo-desc and kept all of the .clamp* rules.
  • Tests: none changed. The header test already expects the clamped <p class="clamp muted small">.
commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs