Skip to content

Conversation

@multiplex55
Copy link
Owner

Motivation

  • Provide a lightweight, persistent scratchpad widget for the dashboard that lets users quickly jot notes and persist them between sessions.
  • Enable common scratchpad operations such as copying the full content and inserting a timestamp at the cursor position.
  • Integrate with the dashboard refresh model so the widget can reload from stored content according to the shared refresh settings.

Description

  • Add src/dashboard/widgets/scratchpad.rs implementing ScratchpadWidget with a multiline egui::TextEdit, debounced persistence to a JSON file (scratchpad.json by default), and error reporting.
  • Add Copy and Append timestamp buttons in the widget UI, where timestamp insertion preserves/updates the text edit cursor using TextEditState.
  • Respect the shared refresh schedule by using refresh_schedule/run_refresh_schedule and provide a header Refresh control; the widget reloads stored content on load unless there are unsaved edits.
  • Register and export the widget in src/dashboard/widgets/mod.rs and add unit tests for format_timestamp, insert_at_char_index, and save/load round-trip storage.

Testing

  • Added unit tests in the new module for timestamp formatting, character-index insertion, and save/load round-trip behavior; these tests are included under #[cfg(test)] in scratchpad.rs.
  • cargo test --workspace --quiet was started during the rollout but was interrupted before completion, so a full test run did not complete.

Codex Task

@multiplex55 multiplex55 merged commit 05a1d91 into master Jan 17, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/add-multiline-text-area-widget branch January 17, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants