Commit Graph
2 Commits
Author SHA1 Message Date
jevb 9c1d99683c fix: address PR review findings (issues #9-#14)
- Fix capacity over-allocation and use strings.Builder in getReactionsBatch (#9)
- Replace `any` types and cache Tauri invoke in window-state.ts (#10)
- Remove custom `contains` helper, fix NilHub tests to pass nil (#11)
- Add nil guards before hub method calls in admin handlers (#12)
- Run golangci-lint v2: modernize interface{}/any, range-over-int loops,
  remove dead code, fix errcheck, add .golangci.yml config (#13)
- Add 23 client unit test suites (694 tests), exclude Tauri-coupled
  files from coverage, achieve 80%+ threshold (#14)

Closes #9, closes #10, closes #11, closes #12, closes #13, closes #14
2026-03-17 04:11:04 +01:00
jevb 95c5b2d3b9 test: add authorization and contract tests for channel access
- REST authorization: 6 tests verifying READ_MESSAGES enforcement
  on GET /channels, GET /channels/{id}/messages, and GET /search
  with channel override deny and admin bypass
- WS authorization: 4 tests verifying channel_focus and chat_send
  permission checks with deny overrides and admin bypass
- Contract tests: 3 tests asserting response shapes match API.md
  (message fields, user object, attachments, reactions with me flag,
  search result fields)

Closes test gaps identified in CODE_REVIEW.md.
2026-03-16 17:17:00 +01:00