unslopkit

Components / Code blocks

Build log by step

A pipeline run as a list of steps with times, the failed one open on its log with the bad lines marked, and the step after it skipped. For CI pages and deploy screens.

Run 482 · main · a41c9e2

Fix family ticket rounding

Failed in 2m 03s

  1. PassedCheck out code2s
  2. PassedInstall dependencies41s
  3. PassedLint12s
  4. FailedRun tests1m 08s
    $ npm test
    PASS tests/cart.test.ts (14 tests)
    PASS tests/timeslots.test.ts (19 tests)
    FAIL tests/pricing.test.ts (9 tests, 1 failed)
      family ticket covers two adults and three children
        Expected: 38
        Received: 47.5
        at tests/pricing.test.ts:27:31
    Tests: 1 failed, 41 passed, 42 total
    Process exited with code 1
Drawn in your kit, Plain.Change the look

The code

Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.

<div class="ukc-code-build-log">
<section class="ci" aria-labelledby="ukc-code-build-log-title">
  <header class="hd">
    <div><p class="k">Run 482 · main · a41c9e2</p><h3 id="ukc-code-build-log-title">Fix family ticket rounding</h3></div>
    <p class="verdict"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>Failed in 2m 03s</p>
  </header>
  <ol class="steps">
    <li class="ok"><div class="row"><span class="st"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg><span class="sr">Passed</span></span><span class="nm">Check out code</span><span class="tm">2s</span></div></li>
    <li class="ok"><div class="row"><span class="st"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg><span class="sr">Passed</span></span><span class="nm">Install dependencies</span><span class="tm">41s</span></div></li>
    <li class="ok"><div class="row"><span class="st"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg><span class="sr">Passed</span></span><span class="nm">Lint</span><span class="tm">12s</span></div></li>
    <li class="bad">
      <details open>
        <summary class="row"><span class="st"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg><span class="sr">Failed</span></span><span class="nm">Run tests</span><span class="tm">1m 08s</span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></summary>
        <pre class="log"><samp><span class="l"><span class="pr">$</span> npm test</span>
<span class="l"><span class="tag">PASS</span> tests/cart.test.ts <span class="dim">(14 tests)</span></span>
<span class="l"><span class="tag">PASS</span> tests/timeslots.test.ts <span class="dim">(19 tests)</span></span>
<span class="l err"><span class="tag no">FAIL</span> tests/pricing.test.ts <span class="dim">(9 tests, 1 failed)</span></span>
<span class="l err">  family ticket covers two adults and three children</span>
<span class="l err">    Expected: 38</span>
<span class="l err">    Received: 47.5</span>
<span class="l err">    <span class="dim">at tests/pricing.test.ts:27:31</span></span>
<span class="l">Tests: <b>1 failed</b>, 41 passed, 42 total</span>
<span class="l">Process exited with code 1</span></samp></pre>
      </details>
    </li>
    <li class="skip"><div class="row"><span class="st"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/></svg><span class="sr">Skipped</span></span><span class="nm">Deploy to staging</span><span class="tm">skipped</span></div></li>
  </ol>
  <footer class="ft"><button class="btn" type="button">Re-run failed step</button><a href="#">Download the full log</a></footer>
</section>
</div>

More code blocks

All 24
  • src/hours/closed-days.tsConflict 1 of 3
    export const closedDays = [
      "2026-12-25",
    <<<<<<< mainkeptdropped
      "2026-12-31", // stocktake
    =======
      "2027-01-02", // staff day
    >>>>>>> holiday-hourskeptdropped
    ];

    Result keeps the stocktake day from main.Result keeps the staff day from holiday-hours.Result keeps both days, main first.

    Merge conflict picker

  • Filter a day with a rangeMarina bookings · Postgres

    AvoidThe function hides the column from its index.
    SELECT id, berth, starts_at
    FROM bookings
    WHERE date(starts_at) = '2026-12-05';
    PreferA plain range the index can walk.
    SELECT id, berth, starts_at
    FROM bookings
    WHERE starts_at >= '2026-12-05'
      AND starts_at <  '2026-12-06';

    Avoid and prefer

  • Git, the five you use daily

    • git switch -c fix/late-feesStart a branch and move onto it
    • git add -pStage your changes one hunk at a time
    • git commit --amend --no-editFold what is staged into the last commit
    • git stash push -m wip-feesPark unfinished work under a name
    • git log --oneline -5See the last five commits, one line each

    Swap fix/late-fees and wip-fees for your own names.

    Command cheat sheet

  • src/pricing/ticket.ts 86% lines8 of 10 branches
    18×export function ticketPrice(age: number, member: boolean) {
    18×  if (age < 5) return 0;
    15×  if (member) {
    6×    return age < 16 ? 4 : 9;1 of 2 branches
      }
    9×  if (age >= 65) {never true
    0×    return 8;never run
      }
    9×  return age < 16 ? 6 : 12;
    }
    • Ran
    • Some branches
    • Never ran

    Coverage gutter

  • import { Halden } from "@halden/sdk";
     
    // Reads HALDEN_KEY from your environment
    const halden = new Halden();
    const job = await halden.jobs.get("JS-2207");
    const invoice = await job.invoice();
    await invoice.send({ to: job.client });
    from halden import Halden
     
    # Reads HALDEN_KEY from your environment
    halden = Halden()
    job = halden.jobs.get("JS-2207")
    invoice = job.invoice()
    invoice.send(to=job.client)
    # The same call, straight to the API
    curl api.halden.example/v2/invoices \
      -H "Authorization: Bearer $HALDEN_KEY" \
      -d job=JS-2207 \
      -d send=true
    $ npx tsx send-invoice.ts
    ✓ Drafted INV-0418 from 22.5 h and 3 receipts
    ✓ Sent to Reyes Framing · $2,140.00
    $ 

    Snippet with terminal

  • Install with
    npm install @halden/sdkpnpm add @halden/sdkyarn add @halden/sdk

    v3.2.018 kB gzippedNode 18 and up

    Install command