ktop Release v0.7.6
ktop v0.7.6 introduces a dedicated [3] Events tab for live, cluster- and namespace-wide Kubernetes Event monitoring, adds a floating Event Detail modal with full untruncated messages and cross-tab object inspection, exposes normalized events in --noui JSON/JSONL snapshots, and refines top-level tab navigation with < / > shortcuts.
Operators can switch directly to [3] Events (via key 3, < / >, --page=events, or ui.default_page: events), filter down to Warnings (w), pause live updates during event storms (f) while tracking incoming event deltas, open any event in a floating modal to read full word-wrapped messages, inspect raw Event YAML (v), or jump directly to the involved Pod, Node, Deployment, StatefulSet, DaemonSet, or Job (g).
Detailed Changes by Category
1. Standalone [3] Events Page & Floating Event Detail Modal (views/events, application, ui, config, cmd)
Cluster-Wide Chronological Event Stream
- Problem / Context: Events were previously visible only inside single-object detail views (
Node Detail,Pod Detail, andWorkload Detail), providing no cluster- or namespace-wide feed for cross-resource warnings such as scheduling failures, image pull errors, mount failures, or eviction cascades. - Technical Implementation: Added the
views/eventspackage (views/events/page.go,views/events/summary.go,views/events/detail_modal.go) and registered[3] Events(application.PageEvents) inapplication/tui/app.go. Added"events"toconfig.ValidPages(config/config.go) and updated--pageincmd/ktop.go. Addedui.EventsContextandui.EventDetailModalContextinui/footer_context.go. - Behavioral Notes:
- Single-line
Summarybar displaysEvents,Warnings,Normal, top firingReason(prioritizing Warning reasons when present), and active stream badges (ALL | WARNINGS ONLY,LIVE | PAUSED (+N new)). - Table columns:
LAST SEEN | TYPE | REASON | OBJECT | NS | COUNT | MESSAGEusingui.TableControllerfor column sorting,/substring filtering, andyclipboard copy. - Key
wtoggles Warnings-only filtering; keyffreezes/resumes live table updates while tracking new event arrivals in the summary bar. Both keys are suppressed while editing/filter input. - Syncs automatically with the global namespace filter shared across
OverviewandWorkloads.
- Single-line
Floating Event Detail Modal & Cross-Tab Object Jump
- Problem / Context: Single-line event table rows truncate long Kubernetes event messages and require manual navigation to inspect the affected workload, pod, or node.
- Technical Implementation: Implemented
events.DetailModal(views/events/detail_modal.go) onui.OverlayFrame, showing normalized metadata (Type,Reason,Object,Count,First Seen,Last Seen,Source,Event Name) above a scrollable, word-wrapped full message view. AddedApplication.JumpToObject(kind, namespace, name)andapplication.IsInspectableObjectKind(kind)inapplication/app_ctrl.go. - Behavioral Notes:
- Pressing
Enteron an event opens the floating Event Detail modal (ESC/qcloses and restores table focus;ycopies the full message;vopens raw Event YAML viak8s.FormatObjectYAML). - Pressing
gjumps to the involved resource when inspectable:Podopens the shared floating Pod Inspector modal over[3] Events,Nodeswitches to[1] Overviewand opens Node Detail, andDeployment/StatefulSet/DaemonSet/Jobswitches to[2] Workloadsand opens Workload Detail. Missing or already-deleted objects display a warning toast instead of opening an empty view.
- Pressing
2. Normalized Event Model, Informer Controller & --noui Snapshot (views/model, k8s, internal/snapshot, collector)
Unified core/v1 and events.k8s.io/v1 Event Normalization
- Problem / Context: Controllers emitting
events.k8s.io/v1events populateSeries.LastObservedTime,Series.Count,EventTime, andReportingControllerrather than legacyLastTimestamp,Count, andSource.Component, causing incomplete counts or misordered timelines. - Technical Implementation: Added
views/model/event_model.go(EventModel,EventsSummary,EventsSnapshot,NewEventModel,EventLastTimestamp,EventFirstTimestamp,EventCount,EventSource,ComputeEventsSummary,SortEventModelsBy). Addedk8s/events_controller.go(SetEventsRefreshFunc,GetEventsSnapshot,HasObject) backed by the existing sharedcoreInformers.Events()informer with no additional API watch or RBAC requirement. UpdatedsortEventsByTimeink8s/client_funcs.goto usemodel.EventLastTimestamp. - APIs / Signatures:
snap, err := ctrl.GetEventsSnapshot(ctx, k8s.AllNamespaces, k8s.DefaultTUIEventsLimit) exists := ctrl.HasObject("Pod", "default", "api-0")
events Field in internal/snapshot and Headless --noui Output
- Problem / Context: Headless
--nouiJSON/JSONL reports previously omitted cluster event summaries and recent event records. - Technical Implementation: Added
EventsData,EventsSummaryData, andEventData(json:"events,omitempty") tosnapshot.Snapshotwith deep-copy support inSnapshot.Clone()(internal/snapshot/snapshot.go) and conversion helpers (eventsDataFromModel,ToEventsSnapshot) ininternal/snapshot/builder.go. PopulatedBuildInput.Eventsincollector/k8s_provider.go(bounded byk8s.DefaultSnapshotEventsLimit) and propagatedEventsontocollector.Aggregate(collector/collector.go). - APIs / Signatures:
{ "events": { "summary": { "total": 12, "warning_count": 2, "normal_count": 10, "top_reason": "BackOff", "top_reason_count": 2 }, "items": [] } }
3. Tab Navigation & Help Overlay Refinement (application, ui, docs)
< / > Page Navigation & Clearer Help Labels
- Problem / Context: Square-bracket page navigation (
[/]) rendered ambiguously in the keyboard shortcuts help overlay (1-3 / [ / ]). - Technical Implementation: Replaced
[/]global page-switching bindings with<(PrevPage) and>(NextPage) inapplication/app_ctrl.go. Updatedui/help_modal.goto display separateKeys 1-3and< or >lines, escaped key labels viatview.Escape, and updateddocs/guide.md,docs/cli.md, anddocs/noui.md.
Upgrade & Compatibility Notes
- Backward Compatibility: Fully backward compatible with existing
ktopCLI flags,kubectl ktopplugin usage,~/.ktop/config.yamlconfigurations, and--nouiJSON/JSONL consumers (eventsis an additiveomitemptyfield). - Behavioral Changes: Sequential previous/next tab navigation now uses
<and>(Shift+,/Shift+.) instead of[and]. Direct numeric tab switching (1–3) is unchanged. - Migration Actions: None required.
Workspace / Repository Metrics
29 files changed, 2368 insertions(+), 39 deletions(-)