Documentation
¶
Index ¶
- func ExtractValuesFromAssignEvents(assignEvents []models.AssignEvent, days int) []int
- func FormatPersonTime(tzOffsetMinutes int) string
- func RenderClipboardMessage(message string) string
- func RenderHelpBar(hasSelection bool, width int) string
- func RenderPeopleList(people []models.Person, maxHeight int, scrollOffset int, terminalWidth int, ...) string
- func RenderPersonActivitySparklines(person *models.Person) []string
- func RenderPersonDepartments(person *models.Person) []string
- func RenderPersonMRReviews(person *models.Person) []string
- func RenderPersonNameAndHandle(name, username string, maxWidth int) (string, string)
- func RenderPersonRoleLabels(person *models.Person) []string
- func RenderPersonStatus(person *models.Person) string
- func RenderPersonTimeLine(tzOffsetMinutes int) string
- func RenderRoleLabel(role string, selected bool) string
- func RenderRoleLabels(roles []string, selectedRoles map[string]bool, maxWidth int) []string
- func RenderSparkline(values []int) string
- func RenderSparklineWithStats(values []int, days int, count int, avg float64) string
- type CopyUsernameMsg
- type EmptyStateContext
- type HelpItem
- type HelpModal
- type HelpModalClosedMsg
- type PeopleList
- func (p PeopleList) ClearSelection() PeopleList
- func (p PeopleList) GetFilteredPeople() []models.Person
- func (p PeopleList) HasSelection() bool
- func (p PeopleList) IsFilterActive() bool
- func (p PeopleList) RenderGrid(availableHeight int, hasAvailFilter bool, hasWorkHoursFilter bool) string
- func (p PeopleList) SetClipboardMessage(msg string) PeopleList
- func (p PeopleList) SetDimmedPeople(dimmed map[string]bool) PeopleList
- func (p PeopleList) SetPeople(people []models.Person) PeopleList
- func (p PeopleList) Update(msg tea.Msg) (PeopleList, tea.Cmd)
- func (p PeopleList) View(availableHeight int) string
- type PersonDetail
- type PersonDetailClosedMsg
- type PersonDetailCopyRequestMsg
- type PersonSelectedMsg
- type ProjectSelectedMsg
- type ProjectSelector
- type ProjectSelectorCancelledMsg
- type RoleSelectionAppliedMsg
- type RoleSelector
- type RoleSelectorCancelledMsg
- type SortSelectedMsg
- type SortSelector
- type VisibleCardRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractValuesFromAssignEvents ¶
func ExtractValuesFromAssignEvents(assignEvents []models.AssignEvent, days int) []int
ExtractValuesFromAssignEvents extracts integer values from assignEvents array Takes the last N days of data
func FormatPersonTime ¶
FormatPersonTime returns a formatted time string with timezone and optional offset e.g., "11:52 pm UTC+08:00 | +7h"
func RenderClipboardMessage ¶
RenderClipboardMessage renders a success/info message (typically for clipboard operations) Returns empty string if message is empty
func RenderHelpBar ¶
RenderHelpBar renders the help/keyboard shortcuts bar at the bottom Shows different shortcuts depending on whether a card is selected
func RenderPeopleList ¶
func RenderPeopleList(people []models.Person, maxHeight int, scrollOffset int, terminalWidth int, selectedIndex int, dimmedPeople map[string]bool, emptyContext EmptyStateContext) string
RenderPeopleList renders a list of people with responsive columns and scrolling dimmedPeople is a map of person keys that should be rendered dimmed (for fade mode)
func RenderPersonActivitySparklines ¶
RenderPersonActivitySparklines renders the activity sparklines for a person Shows 7-day and 30-day assignment trends with statistics
func RenderPersonDepartments ¶
RenderPersonDepartments renders the departments for a person as a bulleted list
func RenderPersonMRReviews ¶
RenderPersonMRReviews renders the MR reviews section for a person
func RenderPersonNameAndHandle ¶
RenderPersonNameAndHandle renders a person's name and username with consistent styling If maxWidth > 0, truncates text that's too long with "..." Returns (nameRendered, usernameRendered)
func RenderPersonRoleLabels ¶
RenderPersonRoleLabels renders the role labels for a person, aligned by project name
func RenderPersonStatus ¶
RenderPersonStatus renders the status line for a person
func RenderPersonTimeLine ¶
RenderPersonTimeLine renders the time string with styled timezone offset Returns a fully styled time line ready to display
func RenderRoleLabel ¶
RenderRoleLabel renders a single role label with tmux-style formatting Role format: "maintainer::backend" becomes [maintainer][backend] - Left part (role type) gets specialty color - Right part (specialty) gets muted gray background
func RenderRoleLabels ¶
RenderRoleLabels renders multiple role labels with automatic wrapping
func RenderSparkline ¶
RenderSparkline renders a Unicode sparkline from a series of values Returns empty string if data is empty
Types ¶
type CopyUsernameMsg ¶
type CopyUsernameMsg struct {
Username string
}
CopyUsernameMsg is sent when user requests to copy username (Ctrl+C)
type EmptyStateContext ¶
type EmptyStateContext struct {
HasNameFilter bool
NameFilterValue string
HasAvailFilter bool
HasWorkHoursFilter bool
}
EmptyStateContext provides context for rendering helpful empty state messages
type HelpModal ¶
type HelpModal struct {
// contains filtered or unexported fields
}
HelpModal displays help information with search functionality
func NewHelpModal ¶
NewHelpModal creates a new help modal
type HelpModalClosedMsg ¶
type HelpModalClosedMsg struct{}
HelpModalClosedMsg is sent when the help modal is closed
type PeopleList ¶
type PeopleList struct {
// contains filtered or unexported fields
}
PeopleList is a component for displaying and interacting with a list of people
func NewPeopleList ¶
func NewPeopleList( people []models.Person, width, height int, clipboardMessage string, ) PeopleList
NewPeopleList creates a new PeopleList component
func (PeopleList) ClearSelection ¶
func (p PeopleList) ClearSelection() PeopleList
ClearSelection clears the selected card
func (PeopleList) GetFilteredPeople ¶
func (p PeopleList) GetFilteredPeople() []models.Person
GetFilteredPeople returns people filtered by name (public method)
func (PeopleList) HasSelection ¶
func (p PeopleList) HasSelection() bool
HasSelection returns whether a card is currently selected
func (PeopleList) IsFilterActive ¶
func (p PeopleList) IsFilterActive() bool
IsFilterActive returns whether the filter input is currently active
func (PeopleList) RenderGrid ¶
func (p PeopleList) RenderGrid(availableHeight int, hasAvailFilter bool, hasWorkHoursFilter bool) string
RenderGrid renders just the people grid (separate from title)
func (PeopleList) SetClipboardMessage ¶
func (p PeopleList) SetClipboardMessage(msg string) PeopleList
SetClipboardMessage updates the clipboard message
func (PeopleList) SetDimmedPeople ¶
func (p PeopleList) SetDimmedPeople(dimmed map[string]bool) PeopleList
SetDimmedPeople updates the dimmed people map (for fade mode)
func (PeopleList) SetPeople ¶
func (p PeopleList) SetPeople(people []models.Person) PeopleList
SetPeople updates the people list (when project/roles change)
func (PeopleList) Update ¶
func (p PeopleList) Update(msg tea.Msg) (PeopleList, tea.Cmd)
Update handles messages for the PeopleList
func (PeopleList) View ¶
func (p PeopleList) View(availableHeight int) string
View renders the PeopleList with title, filter, and grid
type PersonDetail ¶
type PersonDetail struct {
// contains filtered or unexported fields
}
PersonDetail is a component for displaying person details in a modal
func NewPersonDetail ¶
func NewPersonDetail( person *models.Person, clipboardMessage string, ) PersonDetail
NewPersonDetail creates a new PersonDetail component
func (PersonDetail) SetClipboardMessage ¶
func (p PersonDetail) SetClipboardMessage(msg string) PersonDetail
SetClipboardMessage updates the clipboard message
func (PersonDetail) Update ¶
func (p PersonDetail) Update(msg tea.Msg) (PersonDetail, tea.Cmd)
Update handles messages for the PersonDetail
type PersonDetailClosedMsg ¶
type PersonDetailClosedMsg struct{}
PersonDetailClosedMsg is sent when the person detail modal is closed
type PersonDetailCopyRequestMsg ¶
type PersonDetailCopyRequestMsg struct {
Username string
}
PersonDetailCopyRequestMsg is sent when user requests to copy username
type PersonSelectedMsg ¶
PersonSelectedMsg is sent when a person is selected (Enter key)
type ProjectSelectedMsg ¶
type ProjectSelectedMsg struct {
Project string
}
ProjectSelectedMsg is sent when a project is selected
type ProjectSelector ¶
type ProjectSelector struct {
// contains filtered or unexported fields
}
ProjectSelector is a component for selecting a project from a list
func NewProjectSelector ¶
func NewProjectSelector(projects []string, currentProject string, width, height int) ProjectSelector
NewProjectSelector creates a new ProjectSelector
func (ProjectSelector) Update ¶
func (p ProjectSelector) Update(msg tea.Msg) (ProjectSelector, tea.Cmd)
Update handles messages for the ProjectSelector
func (ProjectSelector) View ¶
func (p ProjectSelector) View() string
View renders the ProjectSelector
type ProjectSelectorCancelledMsg ¶
type ProjectSelectorCancelledMsg struct{}
ProjectSelectorCancelledMsg is sent when the selector is cancelled
type RoleSelectionAppliedMsg ¶
RoleSelectionAppliedMsg is sent when role selection is applied
type RoleSelector ¶
type RoleSelector struct {
// contains filtered or unexported fields
}
RoleSelector is a component for selecting multiple roles with checkboxes
func NewRoleSelector ¶
func NewRoleSelector( projectName string, roles []string, selectedRoles map[string]bool, width, height int, ) RoleSelector
NewRoleSelector creates a new RoleSelector
func (RoleSelector) Update ¶
func (r RoleSelector) Update(msg tea.Msg) (RoleSelector, tea.Cmd)
Update handles messages for the RoleSelector
type RoleSelectorCancelledMsg ¶
type RoleSelectorCancelledMsg struct{}
RoleSelectorCancelledMsg is sent when the selector is cancelled
type SortSelectedMsg ¶
type SortSelectedMsg struct {
Option api.SortOption
}
SortSelectedMsg is sent when a sort option is selected
type SortSelector ¶
type SortSelector struct {
// contains filtered or unexported fields
}
SortSelector represents the sort selector modal
func NewSortSelector ¶
func NewSortSelector(currentOption api.SortOption, width, height int) SortSelector
NewSortSelector creates a new sort selector
func (SortSelector) Update ¶
func (s SortSelector) Update(msg tea.Msg) (SortSelector, tea.Cmd)
Update handles messages for the sort selector
type VisibleCardRange ¶
type VisibleCardRange struct {
Start int // First visible card index
End int // Last visible card index (exclusive)
Count int // Number of visible cards
}
VisibleCardRange represents the range of visible card indices
func CalculateVisibleCardRange ¶
func CalculateVisibleCardRange(totalPeople int, maxHeight int, scrollOffset int, terminalWidth int) VisibleCardRange
CalculateVisibleCardRange calculates which cards are visible on screen