I want no duplicated code in Indigo. A clone scan (jscpd --min-tokens 80 --min-lines 12 over src/) finds six clones: 42 lines inside src/atproto/session.c, 26 between src/store/session_store.c and settings_store.c, 15 between draft_store.c and session_store.c (the read-a-small-file and write-it-atomically shape three times), 23 inside src/app/app.c (the list-screen update handlers), and 15 in tools/snapshot.c.
What I want: one small-file store helper (read, write atomically, bounds) that the three stores use, the session job functions folded onto one request/result pattern, and the list screens' update handlers sharing one function. One PR each, host tests green, no behaviour change.
Also from cppcheck --enable=unusedFunction (after #52 removed the one with no callers): indigo_media_known, indigo_layout_hit and indigo_settings_store_clear are called only by the tests; each should be a real API or go.
Written by Claude on my behalf.
I want no duplicated code in Indigo. A clone scan (
jscpd --min-tokens 80 --min-lines 12oversrc/) finds six clones: 42 lines insidesrc/atproto/session.c, 26 betweensrc/store/session_store.candsettings_store.c, 15 betweendraft_store.candsession_store.c(the read-a-small-file and write-it-atomically shape three times), 23 insidesrc/app/app.c(the list-screen update handlers), and 15 intools/snapshot.c.What I want: one small-file store helper (read, write atomically, bounds) that the three stores use, the session job functions folded onto one request/result pattern, and the list screens' update handlers sharing one function. One PR each, host tests green, no behaviour change.
Also from
cppcheck --enable=unusedFunction(after #52 removed the one with no callers):indigo_media_known,indigo_layout_hitandindigo_settings_store_clearare called only by the tests; each should be a real API or go.Written by Claude on my behalf.