You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,18 +12,19 @@ logana is structured around a strict separation between domain logic and the UI
12
12
13
13
**Filter Pipeline** (`filters/`) — `FilterManager` compiles filter definitions into Aho-Corasick automata or regexes and evaluates them against every line to produce a visibility bitmap. The pipeline runs in a background thread. Filter definitions are persisted to SQLite and reloaded on startup.
14
14
15
-
**Mode System** (`mode/`) — Modal UI where each mode owns keyboard input and returns a `KeyResult` for effects that cross mode boundaries. Modes: Normal, Command, Search, Filter, Visual, Comment, Select Fields, DLT Select, Docker Select, Merge Select, Keybindings Help.
15
+
**Mode System** (`mode/`) — Modal UI where each mode owns keyboard input and returns a `KeyResult` for effects that cross mode boundaries. Example of modes: Normal, Command, Search, Filter, Visual, Comment. Each window is also treated as a mode.
16
16
17
17
**UI & Rendering** (`ui/`) — The renderer reads tab state and produces widgets each frame; it never mutates state. The event loop dispatches key events to the active mode. Session state is persisted to SQLite and restored on reopen.
18
18
19
-
**Persistence** (`db/`) — `Database` owns the SQLite connection and schema migrations. `LogManager` builds `FilterManager` instances from persisted filter definitionsand manages session state.
19
+
**Persistence** (`db/`) — `Database` owns the SQLite connection and schema migrations. Storage is accessed through four traits: `FilterStore` (filter definitions), `FileContextStore` (per-file scroll/search/display context), `SessionStore` (open file list), and `AppSettingsStore` (runtime toggles keyed by `SettingsKey`). `LogManager` builds `FilterManager` instances from persisted filter definitions. `MarkManager`and `CommentManager` are in-memory managers owned by `TabState`; their state is flushed to SQLite via `FileContext` on tab close/switch. Session save/restore is coordinated by `SessionManager` in `ui/session.rs`.
20
20
21
21
## Component Diagram
22
22
23
23
```mermaid
24
24
graph TD
25
25
CLI[CLI / main.rs] -->|creates| App[App]
26
26
App -->|owns| Tab[TabState ×N]
27
+
App -->|owns| Session[SessionManager]
27
28
App -->|renders via| Renderer[Renderer]
28
29
Tab -->|owns| Scroll[ScrollState]
29
30
Tab -->|owns| Filter[FilterState]
@@ -32,11 +33,14 @@ graph TD
32
33
Tab -->|owns| Stream[StreamState]
33
34
Tab -->|owns| Display[DisplayConfig]
34
35
Tab -->|owns| Interaction[InteractionState]
36
+
Tab -->|owns| Marks[MarkManager]
37
+
Tab -->|owns| Comments[CommentManager]
35
38
Tab -->|owns| FileReader[FileReader]
36
39
Tab -->|owns| LogManager[LogManager]
37
40
Filter -->|holds| FM[FilterManager]
38
41
Display -->|holds| Parser[LogFormatParser]
39
-
LogManager -->|queries| DB[(SQLite DB)]
42
+
LogManager -->|FilterStore| DB[(SQLite DB)]
43
+
Session -->|FileContextStore / SessionStore / AppSettingsStore| DB
@@ -67,7 +71,7 @@ Live updates are driven by `advance_merged_tabs`, which compares per-source line
67
71
68
72
## Commands
69
73
70
-
`src/commands/` contains clap-derived command definitions shared across layers. `src/ui/commands/` contains the handlers that execute `:` commands, split into `filter.rs`, `io.rs`, `display.rs`, `stream.rs`, and `merge.rs`.
74
+
`src/commands/` contains clap-derived command definitions shared across layers. `src/ui/commands/` contains the handlers that execute `:` commands.
71
75
72
76
## MCP Server
73
77
@@ -170,18 +174,22 @@ graph TD
170
174
|**ratatui**| TUI rendering |
171
175
|**crossterm**| Terminal I/O, key events |
172
176
|**tokio**| Async runtime |
177
+
|**async-trait**| Async trait methods for the mode system |
173
178
|**memchr**| SIMD byte scanning for line indexing |
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,12 @@ All notable changes to logana will be documented in this file.
6
6
## [Unreleased]
7
7
8
8
### Added
9
-
- Export window: `:export` now opens an interactive window when the template footer contains `{{placeholder}}` variables. The window renders one editable field per placeholder, so custom templates with any field names work automatically. Both bundled templates (`markdown` and `jira`) ship with `{{conclusion}}` and `{{next_steps}}` in their footer.
9
+
- Export windows allows filling the placeholders from the template (e.g. Context, next steps and conclusion).
10
+
- Merge view: merge different source into a single view sorted by timestamp.
11
+
- Generate JSON schema for config file validation.
12
+
13
+
### Fixed
14
+
- Panic (index out of bounds) when applying a regex filter after the log file grew past the size it had when the continuation map was built.
0 commit comments