feat(history): nodb backlog — statusbar opt-in, /history off persistence, /privacy runtime switch, /correction fix #116

Manually merged
jabber.developer merged 4 commits from feat/no-db-backlog-114 into master 2026-05-16 15:34:25 +00:00

4 Commits

Author SHA1 Message Date
129eddadd7 fix(command): update logging command argument constraints
All checks were successful
CI Code / Check spelling (pull_request) Successful in 17s
CI Code / Check coding style (pull_request) Successful in 32s
CI Code / Code Coverage (pull_request) Successful in 2m45s
CI Code / Linux (debian) (pull_request) Successful in 4m39s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m53s
CI Code / Linux (arch) (pull_request) Successful in 5m42s
2026-05-16 15:25:23 +00:00
88958c0a37 chore(config): add .kilo/ and .roo/ to gitignore
All checks were successful
CI Code / Check spelling (pull_request) Successful in 17s
CI Code / Check coding style (pull_request) Successful in 32s
CI Code / Code Coverage (pull_request) Successful in 2m43s
CI Code / Linux (debian) (pull_request) Successful in 4m39s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m57s
CI Code / Linux (arch) (pull_request) Successful in 5m39s
2026-05-16 15:08:02 +00:00
df5b39fa7c fix(history): address PR #116 review feedback
All checks were successful
CI Code / Check spelling (pull_request) Successful in 17s
CI Code / Check coding style (pull_request) Successful in 31s
CI Code / Code Coverage (pull_request) Successful in 2m42s
CI Code / Linux (debian) (pull_request) Successful in 4m43s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m58s
CI Code / Linux (arch) (pull_request) Successful in 5m55s
- console: drop orphaned `/logging chat` reference from
  cons_privacy_setting() — the subcommand was removed, PREF_CHLOG now
  tracks PREF_HISTORY implicitly
- console: delete cons_logging_setting() and remove its call from
  cons_show_log_prefs() — every line in it referenced /logging chat or
  /logging group, both now invalid after the deprecation below
- command: deprecate /logging command. It now prints a single notice
  pointing to /history; CMD_PREAMBLE trimmed (min_args=0, no
  setting_func, syntax/args/examples dropped); subcommand 'group'
  removed from autocomplete

The SQLite history-load gap for /correction off is split out into a
follow-up — out of scope for this PR.
2026-05-16 17:53:22 +03:00
102c32c744 feat(history): nodb backlog (#114)
All checks were successful
CI Code / Check spelling (pull_request) Successful in 16s
CI Code / Check coding style (pull_request) Successful in 33s
CI Code / Code Coverage (pull_request) Successful in 2m44s
CI Code / Linux (debian) (pull_request) Successful in 4m45s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m58s
CI Code / Linux (arch) (pull_request) Successful in 5m48s
Implements all open items from the nodb backlog:

statusbar
- PREF_STATUSBAR_SHOW_DBBACKEND (default ON) gates the [sqlite] /
  [flatfile] indicator; toggle via "/statusbar show|hide dbbackend"

/history off|on
- "/history off" now stops persistence as well as hiding history on
  open: sets PREF_DBLOG=off + PREF_CHLOG=false in addition to
  PREF_HISTORY=false
- "/history on" restores persistence (re-enabling PREF_DBLOG=on if
  it was off) and PREF_CHLOG, in addition to PREF_HISTORY=true

/logging
- Removed the "/logging chat on|off" subcommand — chat-log
  persistence is now controlled exclusively by /history; the
  command kept only "/logging group on|off" for MUC logs
- All "use '/logging chat on' to enable" hints replaced with
  "/history on"

/privacy logging
- Single-pass validation across {on, off, redact, flatfile}
- Backend-switching values (on, flatfile) now take effect
  immediately when connected (via log_database_switch_backend),
  matching "/history switch" behaviour; off/redact only flip
  pref bits and keep the live backend open
- Updated help text to reflect runtime switching

/correction off
- win_print_outgoing and win_print_outgoing_with_receipt now gate
  _win_correct on PREF_CORRECTION_ALLOW, matching incoming-msg
  paths. Previously a peer's correction reflected via XEP-0280
  carbons (or the user's own /correct invocation) was applied
  in-buffer regardless of the pref

style
- Two local g_strndup allocations in database_flatfile.c switched
  from char* with manual g_free to auto_gchar gchar*
2026-05-16 08:44:24 +00:00