Conversation
Single item returns a single row, not multiple rows.
Contributor
|
Caution Review failedThe pull request is closed. WalkthroughIntroduces column-based table abstraction with ColumnDef and TableProvider interface, adds reflection-based type resolution with early short-circuit handling, refactors alignment handling to new Alignment type, replaces task rendering with Bubble Tea-based interactive UI, and refactors CSV formatter to separate concerns. Changes
Sequence DiagramssequenceDiagram
participant Client
participant ColumnBuilder
participant TableProvider
participant NewTableFrom
participant TextTable
participant Field as PrettyField
Client->>ColumnBuilder: Column("name").Label("N").Style("bold")...
ColumnBuilder-->>ColumnBuilder: Label/Style/Format/etc chaining
ColumnBuilder->>TableProvider: Build() -> ColumnDef
Client->>NewTableFrom: NewTableFrom([item1, item2])
NewTableFrom->>TableProvider: item.Columns() -> []ColumnDef
NewTableFrom->>Field: Create PrettyField from ColumnDef
NewTableFrom->>TableProvider: item.Row() -> map[string]any
NewTableFrom->>TextTable: Populate headers & rows
TextTable-->>Client: Rendered table with styled columns
sequenceDiagram
participant Manager
participant Tea as BubbleTea Program
participant taskModel
participant View as UI Renderer
participant Task
Manager->>Manager: Check noProgress flag
alt Interactive Mode
Manager->>Tea: startProgram(newTaskModel)
Tea->>taskModel: Init()
taskModel-->>taskModel: Start ticker (250ms)
else Non-Interactive Mode
Manager->>Manager: Start plainRenderLoop
end
Task->>Manager: Update task state
alt Interactive Mode
taskModel->>taskModel: Update(tickMsg/WindowSize/etc)
taskModel->>View: View()
View->>Manager: Get Pretty() output
View-->>View: Apply color & height constraints
View-->>Tea: Render to screen
else Non-Interactive Mode
Manager->>Manager: PlainRender() on ticker
end
Manager->>Tea: stopProgram() on shutdown
Tea->>taskModel: shutdown signal
taskModel-->>Tea: Quit
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🎉 This PR is included in version 1.16.0 |
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.
Summary by CodeRabbit
Release Notes
New Features
Improvements
Dependencies
✏️ Tip: You can customize this high-level summary in your review settings.