Back to feed

sledtools/pika branch #46

pika-git-layout-2

Rebalance branch review columns

Target branch: master

Merge Commit: 161bdaebbfaef9849d3c5cbd91ec903bcb34c63d

branch: merged tutorial: ready ci: success
Open CI Details

Continuous Integration

CI: success

Compact status on the review page, with full logs on the CI page.

Open CI Details

Latest run #58 success

2 passed

head 712adb181da486c4c538c4dd1d09ed510186c322 · queued 2026-03-25 16:41:23 · 2 lane(s)

queued 19s · ran 23s

check-notifications · success check-agent-contracts · success

Summary

This branch simplifies the branch detail page by removing the metadata grid (target, updated, head SHA, merge base, merge commit) from both the Rust backend struct and the HTML template. It also rebalances the two-column review layout, widening the left rail from 320–420px to 420–560px for better readability. Associated CSS classes, responsive breakpoints, and struct fields that are no longer referenced are cleaned up in tandem.

Tutorial Steps

Remove unused metadata fields from DetailTemplate struct

Intent: Strip four fields (updated_at, head_sha, merge_base_sha, merge_commit_sha) from the Askama template struct so the Rust compiler no longer requires them and the template cannot reference stale data.

Affected files: crates/pika-news/src/web.rs

Evidence
@@ -305,13 +305,9 @@ struct DetailTemplate {
     branch_name: String,
     title: String,
     target_branch: String,
-    updated_at: String,
     branch_state: String,
     tutorial_status: String,
     ci_status: String,
-    head_sha: String,
-    merge_base_sha: String,
-    merge_commit_sha: Option<String>,

Four fields are dropped from DetailTemplate:

  • updated_at: String
  • head_sha: String
  • merge_base_sha: String
  • merge_commit_sha: Option<String>

These backed the .branch-meta-grid UI block that is being removed in the template. Removing them from the struct ensures a compile-time guarantee that no template path still references them.

Stop populating removed fields in render function

Intent: Mirror the struct change at the construction site so the template is instantiated without the deleted fields.

Affected files: crates/pika-news/src/web.rs

Evidence
@@ -2192,13 +2188,9 @@ fn render_detail_template_with_notices(
         branch_name: record.branch_name,
         title: record.title,
         target_branch: record.target_branch,
-        updated_at: record.updated_at,
         branch_state: record.branch_state.clone(),
         tutorial_status: record.tutorial_status,
         ci_status: record.ci_status,
-        head_sha: record.head_sha,
-        merge_base_sha: record.merge_base_sha,
-        merge_commit_sha: record.merge_commit_sha,

Inside render_detail_template_with_notices, the four field assignments that forwarded record.* values into the template are removed. The function now constructs DetailTemplate with only the fields that remain in the struct, keeping construction and definition in sync.

Delete branch-meta-grid CSS and HTML block

Intent: Remove the entire metadata grid UI—its CSS rules, responsive overrides, and the HTML markup—since the data is no longer passed to the template.

Affected files: crates/pika-news/templates/detail.html

Evidence
@@ -80,32 +80,6 @@
-      .branch-meta-grid {
-        display: grid;
-        grid-template-columns: repeat(3, minmax(0, 1fr));
-        gap: 0.85rem;
-        max-width: 1360px;
-      }
-      .meta-block { ... }
-      .meta-label { ... }
-      .meta-value { ... }
@@ -266,14 +240,10 @@
-        .branch-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
       @media (max-width: 1024px) {
         .review-layout { grid-template-columns: 1fr; }
         .file-list-sidebar { position: static; }
         .review-main { grid-template-columns: 1fr; }
       }
-      @media (max-width: 720px) {
-        .branch-meta-grid { grid-template-columns: 1fr; }
-      }
@@ -293,33 +263,6 @@
-        <div class="branch-meta-grid">
-          <div class="meta-block">...<code>{{ target_branch }}</code>...</div>
-          <div class="meta-block">...{{ updated_at }}...</div>
-          <div class="meta-block">...<code>{{ head_sha }}</code>...</div>
-          <div class="meta-block">...<code>{{ merge_base_sha }}</code>...</div>
-          {% match merge_commit_sha %}...{% endmatch %}
-        </div>

Three related deletions in detail.html:

  1. CSS class definitions.branch-meta-grid, .meta-block, .meta-label, .meta-value and all their properties are removed (~26 lines of style).
  2. Responsive overrides — The @media (max-width: 1024px) rule for .branch-meta-grid and the entire @media (max-width: 720px) block are deleted.
  3. HTML markup — The <div class="branch-meta-grid"> section containing five meta-block cards (Target, Updated, Head, Merge Base, Merge Commit) is removed from the body.

This eliminates all traces of the metadata grid from the front-end.

Widen the review-main left column

Intent: Rebalance the two-column review layout so the tutorial/summary rail is wider, giving longer content more room before wrapping.

Affected files: crates/pika-news/templates/detail.html

Evidence
@@ -200,7 +174,7 @@
       .review-main {
         min-width: 0;
         display: grid;
-        grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
+        grid-template-columns: minmax(420px, 560px) minmax(0, 1fr);
         gap: 1.25rem;
       }

The .review-main grid definition changes from minmax(320px, 420px) to minmax(420px, 560px) for the left column. This gives the tutorial rail roughly 100–140 px more width at each breakpoint, improving readability for executive summaries and step lists without affecting the fluid right column (minmax(0, 1fr)) that holds the diff viewer.

Diff