docs: tambah doc comment, logging, dan inline comments di semua 255 file
Meliputi: - File-level //! doc comment: tujuan file, alur kerja, komponen utama - Function-level /// doc comment: apa, parameter, return, flow, edge cases - Struct/enum/trait /// doc comment: peran, field docs - Tracing logging (tracing::info!/debug!/trace!/warn!/error!) di setiap fungsi - Inline comments untuk variable dan branching logic penting - Seluruh 8 crates di workspace: zesdex-backend, zesdex-cms, zesdex-entities, zesdex-iam, zesdex-infra, zesdex-ipc, zesdex-middleware, zesdex-utils - Build: 0 errors, 242/242 tests passed
This commit is contained in:
1 parent
6680795ce7
commit
5aaedbf787
255 files changed
+5666
-743
No files matched your search
@@ -1,15 +1,26 @@
|
||||
//! Overlay: usage statistics — detailed token usage, API call count, edit/
|
||||
//! review/lesson activity counters, and session elapsed time.
|
||||
//!
|
||||
//! Flow: reads `state.session_runtime` and passes raw counters through
|
||||
//! `sidebar::compute_usage_summary` to get display-ready numbers, then
|
||||
//! renders them in an info-coloured overlay with two labelled sections:
|
||||
//! "Token Usage" and "Activity".
|
||||
|
||||
use ratatui::style::{Modifier, Style};
|
||||
use ratatui::text::{Line, Span};
|
||||
use ratatui::widgets::{Block, Paragraph};
|
||||
use ratatui::Frame;
|
||||
use crate::view::theme::Theme;
|
||||
use tracing;
|
||||
|
||||
/// Render the Usage overlay — token stats, activity counters, session time.
|
||||
pub fn render(
|
||||
frame: &mut Frame,
|
||||
area: ratatui::layout::Rect,
|
||||
block: Block<'static>,
|
||||
state: &crate::app::state::rest::AppStateRest,
|
||||
) {
|
||||
tracing::debug!("overlay: Usage");
|
||||
let block = block
|
||||
.title(Span::styled(
|
||||
" Usage ",
|
||||
|
||||
Reference in new issue
Block a user