feat(tui): Add Node-Type Colour Coding to Timeline View#23
Open
JasonWarrenUK wants to merge 1 commit intoexperiment/auto-execute-roadmapfrom
Open
feat(tui): Add Node-Type Colour Coding to Timeline View#23JasonWarrenUK wants to merge 1 commit intoexperiment/auto-execute-roadmapfrom
JasonWarrenUK wants to merge 1 commit intoexperiment/auto-execute-roadmapfrom
Conversation
Export BadgeColourFor so timeline (and future views) can look up type colours. TimelineRenderer gains TypeColour callback and TypesColumn fields: when set, each entry shows a coloured badge pill next to the date header and tints body text with the first type's foreground colour. Includes extractTypes helper and tests for coloured output, graceful degradation when the types column is missing, and badge text rendering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Node-Type Colour Coding to Timeline View
Overview
Timeline entries can now display coloured type badge pills and tinted body text, giving each node type a distinct visual identity in the timeline view.
Summary
Previously the timeline was a monochrome scroll of dates and text — like reading a newspaper printed entirely in grey ink. Now each entry wears a little coloured name-tag, as if the nodes got dressed up for a conference and are mingling by the buffet table.
Tip
No action required after pulling. The
TypeColourcallback field onTimelineRendereris opt-in — existing code that constructs the renderer without it continues to work unchanged.Changes
internal/tui/badge.go— export BadgeColourForbadgeColourFortoBadgeColourFor(exported) so other packages can look up type coloursTypeBadgeto use the new nameinternal/tui/badge_test.go— update referencesbadgeColourFortoBadgeColourForinternal/tui/views/timeline.go— type colour supportTypeColour func(typeName string) (bg, fg string)callback fieldTypesColumn stringfield (defaults to "types")Render()now extracts types from each row, renders a badge pill next to date headers, and tints body text with the first type's foreground colourextractTypes()helper that handles[]interface{},[]string, and singlestringvaluestypesColumn()helper for default column nameinternal/tui/views/timeline_test.go— new testsTestTimelineRenderer_TypeColouredOutputDiffersFromPlain— coloured output differs from nil-callback outputTestTimelineRenderer_MissingTypesColumnGraceful— no panic when types column is absentTestTimelineRenderer_TypeBadgeAppearsInOutput— badge text renders in outputTestExtractTypes_*— five tests covering slice-of-interface, string slice, single string, missing column, and nil value🤖 Generated with Claude Code