Commit graph

6 commits

Author SHA1 Message Date
kryptomrx
0eebffe745 test: xUnit test suite and Forgejo CI pipeline
- 43 tests across SlugGuard, ReplContext navigation, NotesCache.TimeAgo
- SlugGuard moved to NozCli.Core.Security (shared between REPL and tests)
- Bug fix: FoldersInView() now returns only actual sub-folders, not note segments
  (previously cd tab-completion suggested note names as navigable folders)
- .forgejo/workflows/ci.yml: build + test on every push/PR
2026-05-16 23:53:40 +02:00
kryptomrx
b971d45e78 security: slug validation, path traversal protection, temp file cleanup
- SlugGuard.IsValid() rejects slugs with path traversal (../, //, uppercase)
- SlugGuard.ToSafePath() ensures sync writes stay within target directory
- PushCommand: skip files with invalid slugs before upload
- SyncCommand: validate server-returned slugs before writing to disk
- EditCommand/NewCommand: try/finally guarantees temp file deletion on crash
- NotesCache: set 600 permissions on cache file (metadata only, no token)
- NewCommand: remove dead Sha256 method (HashHelper already covers this)
2026-05-16 23:36:40 +02:00
kryptomrx
1865a7ccc2 feat(commands): clear, config, version
- clear: clears terminal screen
- config: view and set editor / code-editor preferences
- version: print version and git hash (noz 0.1.0 (abc1234))
2026-05-16 23:21:06 +02:00
kryptomrx
47cc904609 feat(repl): Visual banner, JSON note cache, background refresh, Ctrl+C handling
- Startup banner: FigletText + capabilities panel + note stats with status dots
- JSON cache at ~/.cache/noz/notes.json for instant startup
- Cache-first loading: show REPL immediately, refresh notes in background
- Timestamp in stats line (e.g. 'vor 5 Min.') for data freshness feedback
- Ctrl+C in idle exits REPL gracefully; during command cancels only the request
- Per-command CancellationTokenSource so cancel does not kill the session
- Tab completion: command-aware (cd only suggests folders)
2026-05-16 23:20:39 +02:00
kryptomrx
4248ff2255 refactor(repl): Topic-based navigation model
- Replace flat path string with CurrentTopic + CurrentSubPath
- SlugRelative() strips topic prefix for relative name resolution
- FoldersInView() returns topics at root, slug sub-segments within topic
- NotesInView() filters by topic and subpath
- NavigateTo() / NavigateUp() for cd navigation
- ResolveSlug() / ResolveNewSlug() for command argument resolution
2026-05-16 23:20:29 +02:00
kryptomrx
765ff7a976 Initial commit: noz-cli REPL skeleton 2026-05-16 19:25:39 +02:00