Repository navigation
Fix frozen conversion queue and missing progress updates during CUE->CHD conversion - #155
Conversation
- Convert Converter process execution from blocking Process.runSync to async Process.start - Implement stream line parsers splitting on [\r\n]+ to process carriage return \r progress updates in real-time - Add cleanCommandArgs and splitCommandArgs to strip surrounding quotes from argument lists before calling Process.start - Update HomeController queue state transitions from queued to converting and wrap conversion in try/catch blocks - Capture stderr buffers and exit codes for failed process executions - Add unit tests for argument quote stripping and \r stream progress parsing Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…arden queue transitions - Refactor Converter process execution from blocking Process.runSync to async Process.start - Implement stream line parsers splitting on [\r\n]+ to process carriage return \r progress updates in real-time - Add cleanCommandArgs and splitCommandArgs to strip surrounding quotes from argument lists before calling Process.start - Update HomeController queue state transitions from queued to converting and wrap conversion in try/catch blocks - Capture stderr buffers and exit codes for failed process executions - Add unit tests for argument quote stripping and \r stream progress parsing Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
Summary of Changes:
Real-time Stream Progress Parsing (
core/&gui/):Converter._runincore/lib/src/converter.dartto run tools asynchronously viaProcess.startinstead of blocking synchronously withProcess.runSync.core/(processStreamLines) andgui/(splitStreamLines) that split stream chunks onRegExp(r'[\r\n]+'). This allowschdmanprogress lines that end with\r(without newline) to emit progress events and terminal logs live to the UI.Argument Tokenization & Quote Stripping (
core/):cleanCommandArgsandsplitCommandArgsincore/lib/src/converter.dartto strip surrounding double or single quotes from path and command arguments before passing them as elements ofList<String> argstoProcess.start.Queue State Transitions & Exception Handling (
gui/):startConversioningui/lib/controllers/home_controller.dartto explicitly transitionjob.status = JobStatus.convertingbefore awaiting process execution.try / catch (e, stack)blocks to ensure any unhandled exceptions transition the job status toJobStatus.failed, log the error and stack trace to the terminal, and notify UI listeners.Exit Code & Stderr Error Reporting:
stderroutput buffers and exit codes inConverter._run, setting descriptive job errors when external commands fail (e.g.chdman failed with exit code X: <stderr message>).Tests & Formatting:
gui/pubspec.yamlintldependency constraint to^0.20.2.core/test/argument_parsing_test.dartandcore/test/stream_progress_test.dart.cd core && dart test(38 tests) andcd gui && flutter test(35 tests) pass cleanly.dart analyze(0 issues) anddart format ..PR created automatically by Jules for task 2978587420427434301 started by @ClausValcaTD