Conversation
|
I had that in mind since a long time. I wanted to test OpenCode (Open Source model), so it was a good opportunity. My first AI generated feature. |
Add a persistent circular buffer (1000 entries) for dt_control_log
messages, stored as a GList in dt_control_t. Each entry contains a
timestamp (HH:MM:SS) and the log message, with consecutive duplicate
messages filtered out.
A new toolbar button (speech bubble icon) in the center-bottom-right
panel opens a GtkPopover with a scrollable GtkListBox displaying all
log entries in monospace font. Clicking the button toggles the popover.
Entries are selectable for copy-paste.
Files added/modified:
- src/control/control.{h,c}: GList-based log history storage,
dt_control_log_history_get_entries() API
- src/dtgtk/paint.{h,c}: new dtgtk_cairo_paint_messages icon
- src/libs/tools/log_history.c: new lib module with popover UI
- src/libs/CMakeLists.txt: register the new module
- data/themes/darktable.css: popover styling
Co-authored-by: OpenCode Zen
|
Some notes about the session. First note that this is something I could have done myself without AI so I wanted to see what OpenCode would do and then I could assess about the quality of the work. This was done with less than 10 iterations with the model. First a plan about what to do. Then the model asked me 4 questions about possible alternatives for the implementation. It then generated the code, all compile as the model do check that the code compiles. The popover was empty. I tell the model about this issue and it was fixed. All was working except a GUI glitch. The implementation was using a static array, I then asked the model to rewrite the code to use a GList. Done and the code is correct. For the remaining GUI glitch even after describing the issue the model was not able to fix. So I did that manually, the missing bit was the overshoot/undershoot CSS part. After changing that, all ok. I had 6 commits (that I did) to keep track of the different changes. I asked the model to squash all commit from HEAD to master and to create a message log for the commit. I then pushed the branch here and did the PR. AFAIU OpenCode can be enhanced with some GitHub module, so the last step could have been done by the model itself. But I'm not configured for that yet. |

Add a persistent circular buffer (1000 entries) for dt_control_log messages, stored as a GList in dt_control_t. Each entry contains a timestamp (HH:MM:SS) and the log message, with consecutive duplicate messages filtered out.
A new toolbar button (speech bubble icon) in the center-bottom-right panel opens a GtkPopover with a scrollable GtkListBox displaying all log entries in monospace font. Clicking the button toggles the popover. Entries are selectable for copy-paste.
Files added/modified:
Co-authored-by: OpenCode Zen