fix(capture): use hwnd instead of window title in screenshot filename#44
Merged
Conversation
- New enikk/cron module: store.py (JSON persistence, schedule parsing), runner.py (background thread), tools.py (8 agent tools) - Schedule types: duration (30m), interval (every 2h), cron expr, timestamp - Per-job max_run_time with fallback to global config - Cron sessions marked with ⏰ prefix and cron_ session ID - Toolset 'enikk_cron' (8 tools: create/list/get/update/delete/pause/resume/trigger) - REST API: CRUD + pause/resume/trigger endpoints - Default enabled, 60s tick interval, serial execution - 53 new tests (store, runner, tools)
|
✅ Build succeeded! Artifact: |
- /api/status now returns cron {enabled, job_count, message}
- Status bar moved from sidebar to full-width bottom of page
- Cron indicator shows ⏰ + active job count with tooltip
- Layout restructured: body flex-col, main area flex-1, status bar at bottom
- 3 new unit tests for status endpoint cron section
- Session list redesigned with Chat/Cron tabs
- Cron tab shows cron sessions with search and filter
- Clicking cron job history button switches to Cron tab with filter
- Filter indicator shows active filter with clear button
- Cron sessions marked with is_cron flag instead of filtering
- Added /api/cron/{job_id}/sessions endpoint
- UI improvements: emoji icons, session title in header, breadcrumb
- Bug fixes: null checks, pause visibility, custom confirm dialog
- i18n: tab labels, filter text, search placeholder
Add background cleanup_loop that resets stale chat_id → session_id bindings at 04:00 daily (if inactive > 1h) to prevent unbounded state growth. - Track _chat_last_active timestamps per chat_id in state file - 7 tests in TestSessionCleanup
- New autostart.py module wrapping schtasks.exe (ONLOGON, HIGHEST privilege) - --start-minimized CLI flag to launch hidden in system tray - GET/PUT /api/autostart endpoints to query and toggle status - UI toggle in Basic config tab with i18n support (zh-CN, en) - Syncs config.yaml with actual Task Scheduler state
Chinese characters in window titles caused cv2.imwrite to fail on Windows due to non-ASCII path encoding. Also switched to cv2.imencode + open().write() to handle any remaining non-ASCII path components (e.g. user profile directory).
64e531a to
9c0b1b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Screenshot filenames included the window title (via win32gui.GetWindowText). When the title contains Chinese characters, str.isalnum() returns True for them, allowing non-ASCII characters into the filename. cv2.imwrite on Windows cannot handle non-ASCII paths and fails.
Changes