Skip to content

feat(gui): integrate GUI launch with CLI and implement live audio transcription loop - #42

Closed
MrSpideyNihal wants to merge 9 commits into
developmentfrom
feature/gui-launch-integration
Closed

MrSpideyNihal wants to merge 9 commits into
developmentfrom
feature/gui-launch-integration

Conversation

@MrSpideyNihal

Copy link
Copy Markdown
Owner

Summary

Integrates the actual CustomTkinter GUI window launch with the command-line interface (replacing the CLI placeholder), and implements the real-time background transcription thread and database persistence loop when recording audio.


What's Changed

src/taskify/cli/main.py

  • Replaced the GUI click placeholder with a production launch loop:
    1. Loads user settings.
    2. Sets up and runs the SQLite DatabaseManager.
    3. Instantiates and starts the ExtractionScheduler daemon.
    4. Spawns and starts the CustomTkinter MainWindow window.
    5. Implements a graceful close handler (WM_DELETE_WINDOW) to stop background threads, flush database connections, and destroy the app.

src/taskify/ui/main_window.py

  • Implemented real-time transcription and database writing:
    • When recording starts, gets/initializes STTEngine and TranscriptWriter instances.
    • Spawns a daemon _transcribe_loop thread that fetches chunks from the AudioCapture queue at high frequency, processes them through the STT engine, posts text updates to the live transcript pane thread-safely via self.after(0, ...), and saves/flushes TranscriptSegment session records.
    • Added clean teardown inside _stop_recording to wait/join the transcription thread and shut down the writer.

tests/unit/test_cli.py

  • Updated test_default_invocation to mock DatabaseManager, ExtractionScheduler, and MainWindow to prevent spawning real GUI components and threads in test environments.

Code Formatting

  • Reformatted all import blocks and codebase formatting with Ruff check and formatting options to ensure PEP-8 compliance.

Test & Validation Results

ruff check src/   → ✅ clean
mypy src/         → ✅ clean
pytest            → ✅ 150 passed

MrSpideyNihal and others added 9 commits July 17, 2026 12:37
feat: Eisenhower Matrix dashboard main window
…nscription loop

- Replace the click command's GUI placeholder in src/taskify/cli/main.py with the actual instantiation and launch loop for MainWindow, DatabaseManager, and ExtractionScheduler.
- Implement background thread transcription logic in MainWindow._start_recording and MainWindow._stop_recording:
  * Initialize the configured STTEngine and load model weights on start recording.
  * Start TranscriptWriter thread to persist transcribed chunks.
  * Spawn a daemon _transcribe_loop thread that reads audio chunks from AudioCapture queue, transcribes them, appends to UI transcript pane, and saves segment database records.
- Refactor 	ests/unit/test_cli.py to mock MainWindow, DatabaseManager, and ExtractionScheduler during default invocation CLI tests.
- Reformat codebase and imports with Ruff to align with standard styling guidelines.

All 150 unit tests passed, ruff clean, mypy clean.
@MrSpideyNihal

Copy link
Copy Markdown
Owner Author

Superseded: all changes from this branch have been merged into main directly. Closing as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant