Commit graph

68 commits

Author SHA1 Message Date
036d57176f
fix: fix lsp adding two @
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m41s
Continuous Integration / Build Package (push) Successful in 2m21s
2026-04-19 20:48:56 +02:00
d872e9e338
fix(daily): use midnight when creating file for non-today date
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 4m17s
Continuous Integration / Build Package (push) Successful in 5m24s
2026-04-19 10:55:13 +02:00
d0e4dccd1a
refactor: simplify LSP implementation
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m34s
Continuous Integration / Build Package (push) Successful in 2m17s
- Extract find_pattern_occurrences_in_lines helper; use in both references and rename handlers (deduplicates word-boundary search logic)
- Add MD_EXT constant to replace three repeated "md" string literals
- Fix double lock acquire/drop/re-acquire in code_action (use single guard)
- Fix symbol() to populate file_lines cache when parsing from disk (avoids redundant re-reads on subsequent requests)
- Remove section separator comment blocks (code structure is self-evident from Rust syntax)
2026-04-13 21:52:41 +02:00
b224620212
fix: resolve clippy warnings in lsp module
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 2m30s
Continuous Integration / Build Package (push) Successful in 3m38s
- Replace map_or(false, ...) with is_none_or(... !=)
- Replace explicit auto-derefs (&*Static) with auto-deref (&Static)
- Refactor range-indexed loop to iterator with enumerate + skip/take
- Suppress deprecated root_path field with allow(deprecated)

docs: update README and REQUIREMENTS for streamd lsp

- Add streamd lsp to commands table in README
- Add Editor Integration section with Zed, Neovim, VS Code snippets
- Add R25 LSP requirements (R25a–R25e) to REQUIREMENTS.md
2026-04-13 21:42:15 +02:00
50c592a641
feat: add streamd lsp subcommand with LSP server
Implements a full Language Server Protocol server accessible via
`streamd lsp`. The server communicates over stdin/stdout and auto-
detects the workspace root from the LSP initialize request.

Features implemented:
- Passive mode when no .streamd.toml exists in workspace root
- Workspace-root-based config loading (bypasses R22/R23 global config)
- .streamd.toml file watcher (config reloads without restart)
- textDocument/completion with @ trigger, conditional suggestions
  (if_with relationships), and temporal date/time snippets (R16)
- textDocument/publishDiagnostics: R15 file-name format + R18
  timesheet violations (overlapping timecards, unclosed days)
- textDocument/documentSymbol: shard tree exposed as nested symbols
- textDocument/codeAction: "Mark task as done" quickfix for @Task
- workspace/symbol: cross-file shard search
- textDocument/references: find all @Marker occurrences
- textDocument/rename: rename @Marker across all files

Dependencies added: tower-lsp 0.20, tokio, dashmap, serde_json
2026-04-13 21:37:38 +02:00
ab2fc823e8
feat: streamd daily is now default instead of streamd new 2026-04-13 20:09:09 +02:00
46766a9ec7 fix: cross-platform compatibility for Windows support
- Use directories::BaseDirs for config path fallback instead of hardcoded Unix path
- Default to notepad on Windows instead of vi for editor commands
- Skip +N line argument for notepad in todo edit (notepad doesn't support it)
2026-04-13 19:53:48 +02:00
ee96033639
refactor: remove duplicate code
All checks were successful
Release / Build and Release (push) Successful in 5s
Continuous Integration / Lint, Check & Test (push) Successful in 1m43s
Continuous Integration / Build Package (push) Successful in 1m54s
2026-04-13 19:49:50 +02:00
bf700a15af
feat: add streamd daily command
`streamd daily [YYYYMMDD]` opens the earliest existing daily file
(file_type=daily) whose timestamp falls within the target date.
If no such file exists it creates `<timestamp>_daily.md` and opens it.
Date defaults to today in the repository timezone.
2026-04-13 19:31:32 +02:00
b653590c36
feat(localize): extract file_type from filename prefix
Add `extract_file_type_from_file_name` to parse prefixes like `_daily`
from filenames (e.g. `20260412-123456_daily.md` → `"daily"`).

Insert the result into `initial_location` in `localize_stream_file` so
all localized shards carry a `file_type` dimension value.

Also register the `file_type` dimension in `TaskConfiguration` so the
propagation contract is documented.
2026-04-13 19:30:59 +02:00
e15e6f1053
fix: broken tasks extraction
All checks were successful
Release / Build and Release (push) Successful in 6s
Continuous Integration / Lint, Check & Test (push) Successful in 1m33s
Continuous Integration / Build Package (push) Successful in 1m43s
2026-04-13 19:26:31 +02:00
e562af0dc3
fix: clippy warnings
All checks were successful
Release / Build and Release (push) Successful in 6s
Continuous Integration / Lint, Check & Test (push) Successful in 1m26s
Continuous Integration / Build Package (push) Successful in 1m36s
2026-04-07 13:43:40 +02:00
5dca68037d
chore: fix timezone handling
Some checks failed
Continuous Integration / Lint, Check & Test (push) Failing after 57s
Release / Build and Release (push) Successful in 5s
Continuous Integration / Build Package (push) Successful in 1m43s
2026-04-07 13:26:34 +02:00
e8dc2013bc
chore: make datetime pure 2026-04-07 13:13:55 +02:00
22ada87de6
feat(timesheet): make hour-output default, decimal with two decimals 2026-04-07 09:56:46 +02:00
0533c7777a
feat: add timesheet debug 2026-04-07 08:42:14 +02:00
d614d678af
chore: switch from h-float to min-int in timesheet
Some checks failed
Release / Build and Release (push) Successful in 6s
Continuous Integration / Lint, Check & Test (push) Failing after 56s
Continuous Integration / Build Package (push) Successful in 1m42s
2026-04-07 08:28:50 +02:00
42d9ecd3d9
feat: add --minutes flag to timesheet command
All checks were successful
Release / Build and Release (push) Successful in 5s
Continuous Integration / Lint, Check & Test (push) Successful in 1m43s
Continuous Integration / Build Package (push) Successful in 1m56s
Adds a -m/--minutes flag to `streamd timesheet` that displays time
in HH:MM format (e.g., 8:30) instead of decimal hours (e.g., 8.5h).
Includes unit tests for both formatting functions.
2026-04-07 07:57:28 +02:00
aa8f83e321
fix: replace vec! with array to satisfy clippy useless_vec lint
All checks were successful
Continuous Integration / Build Package (push) Successful in 26s
Continuous Integration / Lint, Check & Test (push) Successful in 42s
2026-04-02 18:36:10 +02:00
e05e9cfd90
test(todo): add comprehensive unit tests for todo features
Add tests for:
- @Done insertion at various line positions
- Future task filtering with show_future flag
- Task sorting by moment ascending
- Error message formatting for all new error variants
- Trailing newline preservation
2026-04-02 18:28:13 +02:00
124a5b7e2a
feat(todo): add numbered tasks, edit, done, and future filtering
Implement smoother todo editing with the following features:
- Display numbered tasks [1], [2], etc. in `streamd todo`
- Add `streamd todo N edit` to open editor at task line
- Add `streamd todo N done` to insert @Done after @Task
- Add `--show-future` flag to include future tasks (hidden by default)
2026-04-02 18:27:19 +02:00
a8c41ec833
refactor: use chrono for month names
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m20s
Continuous Integration / Build Package (push) Successful in 1m40s
2026-04-02 18:18:48 +02:00
d11a35c157
refactor(timesheet): use repeat() for separator lines and sort points before grouping
All checks were successful
Continuous Integration / Build Package (push) Successful in 25s
Continuous Integration / Lint, Check & Test (push) Successful in 41s
2026-04-02 17:07:36 +02:00
b51fb511ac
fix(timesheet): display zero hours as positive instead of negative zero 2026-04-02 17:07:06 +02:00
7bee32886f
feat(timesheet): sort months ascending so newest is at bottom 2026-04-02 17:06:28 +02:00
ca43106486
feat(timesheet): add formatted report output to CLI
Replace CSV output with formatted table display showing:
- Monthly breakdown with expected/actual hours per day
- Day types (Regular, Sick Leave, Vacation, Holiday, Flex Day, etc.)
- Warning indicators for missing days and overlapping timecards
- Monthly summaries with total expected/actual hours
- Cumulative balance across all months
- Detailed warnings section at the end

Shows helpful message when no .streamd.toml configuration is found.
2026-04-02 16:22:27 +02:00
1a716f6d0e
feat(timesheet): add report generation logic
Implement the core report generation that:
- Loads .streamd.toml configuration
- Calculates expected hours based on periods and day types
- Calculates actual hours following day type rules:
  - Sick leave: max(expected, worked)
  - Vacation: expected + worked
  - Flex day: 0
  - Holiday: 0 expected
- Generates warnings for missing days, overlapping timecards,
  and work outside configured periods
- Calculates monthly and cumulative balances
- Sorts months in descending order
2026-04-02 16:22:26 +02:00
e0ba2cddf3
feat(timesheet): add overlap detection for timecards
Add find_overlapping_timecards function to detect overlapping time
ranges on the same day. This is used to generate warnings in the
timesheet report.
2026-04-02 16:22:25 +02:00
92ca364e55
feat(timesheet): add report data structures
Add DayReport, DayType, DayWarning, MonthReport, and TimesheetReport
structs for generating timesheet reports. These support:
- Day types (Regular, SickLeave, Vacation, Holiday, FlexDay, Weekend, Missing, OutsidePeriod)
- Warnings for missing days, overlapping timecards, and outside-period work
- Monthly and cumulative calculations
2026-04-02 16:22:24 +02:00
92c8e9712a
feat(timesheet): add configuration model with period validation
Add TimesheetConfig and Period structs for configuring timesheet
periods with expected working hours per week. Include RepositoryConfig
for loading .streamd.toml with timezone and timesheet configuration.

Validation ensures:
- No overlapping periods
- Valid date ranges (start <= end)

Also adds chrono-tz dependency for timezone support.
2026-04-02 16:22:21 +02:00
8d07a86fc4
chore: switch from yaml to toml
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m47s
Continuous Integration / Build Package (push) Successful in 2m20s
2026-03-29 19:14:51 +02:00
ed493cff29
refactor: rewrite in rust
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m38s
Continuous Integration / Build Package (push) Successful in 1m54s
2026-03-29 18:28:03 +02:00
af2debc19b
refactor!: rename package from streamer to streamd
- Rename src/streamer/ to src/streamd/
- Update all internal imports
- Update pyproject.toml project name and entry point
- Update README branding (Streamer -> Strea.md)
- Switch from pyright to basedpyright
- Bump requires-python to >=3.13
2026-02-15 17:33:22 +01:00
49cd9bcfa0
fix: resolve all basedpyright warnings
- Use collections.abc.Generator/Iterable instead of deprecated typing imports
- Replace Optional with union syntax (X | None)
- Add explicit type annotations to eliminate reportUnknownVariableType
- Use typing.cast for untyped mistletoe attributes (content, level, line_number)
- Replace mutable default arguments with None defaults (reportCallInDefaultInitializer)
- Add ClassVar annotation for model_config (reportIncompatibleVariableOverride)
- Add @override decorator for settings_customise_sources (reportImplicitOverride)
- Annotate class attributes in Tag (reportUnannotatedClassAttribute)
- Add parameter type annotations in test (reportMissingParameterType)
- Assign unused call result to _ (reportUnusedCallResult)
2026-02-15 17:33:21 +01:00
0a554aae14
feat: implement basic timesheet command
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 44s
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-02-01 21:56:20 +01:00
22630773ab
feat: add timecard extraction
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 45s
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-02-01 17:45:56 +01:00
260400fa34
feat: add overwrite configuration
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-02-01 12:09:38 +01:00
eaca24b8ae
feat: implement edit-command
Some checks failed
Continuous Integration / Lint, Check & Test (push) Failing after 47s
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-02-01 10:01:40 +01:00
027bf531ce
feat: base task command on position instead of tags
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-02-01 10:01:13 +01:00
84ad91d4c4
feat: add preconfigured repository configurations
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-01-31 19:51:03 +01:00
84843aea12
fix: attach_markdown type issue
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-01-31 19:50:47 +01:00
1040c060f6
feat: add merge for repository configuration
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-01-31 19:50:36 +01:00
4dbd142c74
feat: better localization of shards
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-01-31 17:54:50 +01:00
79095bad4a
refactor: store file in position, rename filename to file_name
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-01-31 17:22:05 +01:00
d5b1541436
feat: extract date & time from tags
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-01-31 17:15:01 +01:00
ee91b2e8db
feat: add all_files iterator to simplify searching
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-01-31 17:14:31 +01:00
1ce0790c0c
feat: add attach_markdown
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2026-01-30 18:03:44 +01:00
43e8a829bb fix: update imports
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 57s
2026-01-18 18:20:21 +01:00
eaf7fe9b2a
chore: fix pyright errors to make pipeline green 2025-10-12 08:30:10 +02:00
0c61067db0
feat: add initial support for positioning
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
2025-06-22 18:02:42 +02:00