Skip to content

Commit 37ba049

Browse files
cboosclaude
andauthored
Connect fork-point and branch headers to their anchor message (#238)
* Connect fork-point and branch headers to their anchor message The fork-point box rendered with an 8px top gap below the message it hangs off (now visible as a landmark after #233), reading as a detached floating element. The branch headers floated similarly above their own content. Tie both to their anchors with a dashed top-border "connector" and a closed gap, while the .children indent still shows subordination: - .fork-point: top margin 8px → -1.2em (cancels the card's 1em bottom margin so it sticks up under the message above), border-top dashed, square top corners so the dashed edge reads as a connector tab. - .branch-header: bottom margin 1em → 0 (sticks to its branch content below), matching dashed top border. Snapshots regenerated (CSS is inlined into the HTML output); the diff is limited to these two rules. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Square the branch-header bottom to mirror the fork-point squared top For visual consistency: the fork-point has a squared top (where it connects up to the message above), so the branch header — which sticks to its own content below — should have a squared bottom (where it connects down). Round the top, square the bottom on .branch-header, and square its own fold-bar's bottom corners too (the fold-bar sits at the card's bottom edge, so its rounded corners would otherwise undo it). Snapshots regenerated (inlined CSS); diff limited to these rules. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 61fd066 commit 37ba049

3 files changed

Lines changed: 192 additions & 35 deletions

File tree

‎claude_code_log/html/templates/components/message_styles.css‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,15 +806,29 @@ div.system-hook .header {
806806
box-shadow: none;
807807
border: none;
808808
border-left: 3px solid var(--branch-point-color);
809+
/* Dashed top border as a connector (mirrors .fork-point), and no bottom
810+
margin so the header sticks to its own branch content below. The bottom
811+
corners are squared (mirroring .fork-point's squared top) so the left
812+
rail flows cleanly into the branch content rather than rounding off. */
813+
border-top: 1px dashed var(--branch-point-color);
814+
border-radius: 8px 8px 0 0;
809815
padding: 8px 14px;
810-
margin: 2em 0 1em 0;
816+
margin: 2em 0 0 0;
811817
}
812818

813819
.branch-header .header {
814820
font-size: 1em;
815821
margin-bottom: 0;
816822
}
817823

824+
/* The header's own fold-bar sits at the bottom of the card; square its
825+
bottom corners too so the squared branch-header bottom isn't undone by the
826+
fold-bar's own rounded corners. Direct child only — never a fold-bar of a
827+
message nested inside the branch content. */
828+
.branch-header > .fold-bar {
829+
border-radius: 0;
830+
}
831+
818832
.branch-header .fold-bar[data-border-color="session-header"] .fold-bar-section.folded {
819833
border-bottom-color: var(--branch-point-color);
820834
}

‎claude_code_log/html/templates/components/session_nav_styles.css‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,19 @@ a.session-backlink:hover {
125125
line-height: 1.3;
126126
}
127127

128-
/* Fork point element — standalone structural element after a fork message */
128+
/* Fork point element — rendered inside the fork node's .children, so it
129+
reads as hanging off the message above it. Pull it up against that
130+
message (negative top margin cancels the card's 1em bottom margin) and
131+
add a dashed top border as a connector, while the .children indent still
132+
shows it's subordinate. */
129133
.fork-point {
130-
margin: 8px 0 2em 0;
134+
margin: -1.2em 0 2em 0;
131135
padding: 8px 14px;
132136
font-size: 0.85em;
133137
color: var(--text-muted, #6c757d);
134138
border-left: 3px solid var(--fork-point-color);
135-
border-radius: 8px;
139+
border-top: 1px dashed var(--fork-point-color);
140+
border-radius: 0 0 8px 8px;
136141
}
137142

138143
.fork-point-header {

0 commit comments

Comments
 (0)