Hive Hive
Sign in

style(specs): polish spec list preview and markdown chrome

GitHub issue · Closed

Metadata
Source
tuist/hive #36
Updated
Jun 24, 2026
Domains
Hive
Details

Summary

Three small polish fixes to the spec UI noticed while browsing the section:

  • The spec list preview was just collapsing whitespace, so the raw markdown of the body (headings, fenced code blocks, inline backticks) was leaking into the table cell. Added a strip_markdown/1 pass before truncating so the preview reads as plain prose. Intraword underscores are preserved so identifiers like Tuist.Namespace.create_instance_with_ssh_connection/1 survive.
  • Inline <code> in the spec body and comment body now uses the Noora prose treatment from ../tuist/server/assets/shared/css/prose.css: a subtle 3-layer box-shadow plus --noora-radius-2 over surface-background-secondary, instead of the flat tertiary pill.
  • Code blocks (<pre>) get the matching elevated chrome (same shadow stack, --noora-radius-4, no border) and !important on the background so MDEx’s inline background-color from the github_light theme can’t override it. When a fence language is set the highlighted tokens now read against a consistent backdrop; when not, the block at least looks intentional.

Context

A couple of approaches were considered for the preview strip:

  • Render the body to HTML through MDEx and strip tags. Correct but heavy for every row of the table.
  • A small regex pass. Cheap, covers the common cases the user actually sees (headings, fences, backticks, list markers, links, emphasis). Picked this.

The first attempt at the regex also stripped _ as an emphasis marker, which mangled function arities. CommonMark treats intraword underscores as literal, so the underscore branch was dropped and only * / ~~ are stripped now. A regression test pins this down.

A code-window-style wrapper with a language bar (like the marketing site uses) was considered but skipped: it requires touching the markdown pipeline and the user did not ask for it. Worth a follow-up if syntax highlighting becomes a bigger deal for spec bodies, alongside a default_lang for fences that omit one.

Testing

  • mix test test/hive_web/live/spec_live/ test/hive/specs_test.exs — 33 tests, 0 failures
  • mix compile --warnings-as-errors
  • mix format --check-formatted on the touched files
  • mix credo lib/hive_web/components/spec_components.ex
  • Visual check pending in the running app
Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments
GA
github-actions[bot] Jun 16, 2026

Blick review didn’t run

The blick review step failed before producing a manifest, so there’s no review to post on this PR. This usually means the agent (opencode) couldn’t start — common causes are an expired or suspended model API key, a missing secret, or the workflow timing out.

See the workflow run for details: https://github.com/tuist/hive/actions/runs/27610767720

Commit: 3bc30842f7e1e4b0d9c32433480ff09e2ab65fc9

GA
github-actions[bot] Jun 16, 2026

Blick review didn’t run

The blick review step failed before producing a manifest, so there’s no review to post on this PR. This usually means the agent (opencode) couldn’t start — common causes are an expired or suspended model API key, a missing secret, or the workflow timing out.

See the workflow run for details: https://github.com/tuist/hive/actions/runs/27614649869

Commit: c90ed24f1f16f574a6259b73f853df9e198c0191