Add TUI tool for working with the Launchpad upload queue#15
Draft
Add TUI tool for working with the Launchpad upload queue#15
Conversation
Create a standalone TUI tool for managing the Ubuntu Launchpad upload queue. This initial commit provides the project skeleton with: - pyproject.toml with dependencies (launchpadlib, textual) - lp_queue/launchpad.py: LaunchpadQueue class and QueueItem dataclass with stub methods for connect, get_queue_items, get_debdiff, accept, and reject - lp_queue/app.py: Textual TUI application with ReviewScreen, RejectScreen, and QueueApp with placeholder action handlers - tests/test_launchpad.py: Initial unit tests - README.md: Documentation and usage instructions Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/e30960b7-6a71-4012-be79-2b99750788cd Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Implement all LaunchpadQueue methods: - connect(): authenticate via launchpadlib OAuth - get_queue_items(): fetch upload queue with sync detection - get_debdiff(): download source files and run debdiff, with changes file fallback for new packages - accept(): delegate to LP acceptFromQueue API - reject(): delegate to LP rejectFromQueue API with comment Wire the TUI with async workers so network operations run in background threads, keeping the UI responsive. Add comprehensive tests for launchpad module (21 tests) and TUI app (5 async tests). Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/e30960b7-6a71-4012-be79-2b99750788cd Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Replace pytest.importorskip("subprocess") with a direct import of
subprocess.TimeoutExpired, since subprocess is a standard library
module that does not need conditional importing.
Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/e30960b7-6a71-4012-be79-2b99750788cd
Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add small TUI to work with the Launchpad queue
Add TUI tool for working with the Launchpad upload queue
Mar 31, 2026
Collaborator
|
@copilot Great, now add a status bar to tell the user when something is happening in the background, such as "loading queue list", "fetching debdiff", etc... |
Copilot stopped work on behalf of
Hyask due to an error
April 1, 2026 09:07
Collaborator
|
@copilot You encountered an issue last time, so let's try again. Great, now make the status bar visible to tell the user when something is happening in the background, such as "loading queue list", "fetching debdiff", etc... It seems there is already something in the code, but it's not visible from the UI. |
- Add width: 100% to .status-bar CSS so it spans the full terminal - Add busy/error/success CSS classes with distinct background colors - Update _set_status() to accept a state parameter and toggle classes - Add emoji prefixes (⏳/❌/✔) to all status messages for clarity Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/01684a6e-0b54-4ab5-8ddc-0276a05e4f76 Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Copilot
AI
changed the title
Add TUI tool for working with the Launchpad upload queue
Make TUI status bar visible with state-based styling
Apr 1, 2026
Add a RichLog-based debug panel below the DataTable that records every Launchpad API call made by LaunchpadQueue. The panel is hidden by default and can be toggled with the ~ (Shift+backtick) shortcut. Changes: - launchpad.py: add set_log_callback() / _log() and instrument all LP API calls (connect, lp_user_name, get_queue_items, get_debdiff, accept, reject, _get_current_source) - app.py: add #debug-panel Vertical with RichLog, CSS for hidden/visible states, "tilde" keybinding, and callback wiring - tests: add TestDebugPanel (4 tests) and TestLaunchpadQueue log callback tests (2 tests) Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/88021ed5-9f29-4d2a-8064-d9c993cdcfaf Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
…d in _on_lp_log Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/88021ed5-9f29-4d2a-8064-d9c993cdcfaf Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/3ae9d084-070e-4f70-b737-d967d21b0c9b Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
…es switcher Add ConfirmScreen modal shown before Accept and Reject actions proceed. Add SeriesScreen modal with F2 shortcut to list and switch Ubuntu series. Add get_all_series() and switch_series() to LaunchpadQueue. Add 15 new tests covering all new features (47 total). Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/3ae9d084-070e-4f70-b737-d967d21b0c9b Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Replace _download_debian_source() and its helpers (_debian_pool_prefix, _strip_epoch, _parse_dsc_files) with a new _get_debian_source() method that uses lp.distributions["debian"].main_archive.getPublishedSources() to locate Debian source packages, then downloads files via sourceFileUrls(). This removes manual URL construction, .dsc file parsing, and component iteration in favor of the standard launchpadlib API. Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/292b2bdd-88a1-482b-9242-7fac594d9acd Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/292b2bdd-88a1-482b-9242-7fac594d9acd Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
- Remove _run_debdiff from imports (now an instance method) - Update display_name assertions: space → slash separator - Rewrite TestRunDebdiff to test via LaunchpadQueue instance with work_dir - Fix timeout test to account for diffoscope+xdg-open calls before debdiff - Update TestDebdiffSyncFallback for new get_debdiff flow: syncs go directly to _get_debian_source, _run_debdiff is instance method Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/deee44af-cb6c-4e3b-a4d1-c8f3efa5c789 Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/deee44af-cb6c-4e3b-a4d1-c8f3efa5c789 Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Use rich.syntax.Syntax with 'diff' lexer to render debdiff content in the ReviewScreen's RichLog widget for better visual output. Add test to verify the diff highlighter is used. Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/f1317c71-fe0e-4ec8-96c4-d3c88d27deed Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/f1317c71-fe0e-4ec8-96c4-d3c88d27deed Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
- Add `authors` field to QueueItem dataclass - Add `_extract_lp_username()` to extract LP usernames from API links - Add `_build_authors()` to format author info per upload type: - Syncs: show the requestor - Regular uploads: show the signer, plus sponsor when different - Add "Author(s)" column to the DataTable - Add tests for new helpers and integration Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/a031ccbc-2261-4fbf-a64e-6cce2ff876f8 Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
- Add QUEUE_STATUSES list in launchpad.py - Add QueueStatusScreen modal (modeled after SeriesScreen) - Add F3 key binding to open the queue status selector - Track queue_status on QueueApp, default QUEUE_STATUS_UNAPPROVED - Pass queue_status to all get_queue_items() call sites - Add 7 tests for QueueStatusScreen and status switching flow Agent-Logs-Url: https://github.com/ubuntu/ubuntu-release/sessions/9c52e4a6-3022-42fa-a9f7-1f2ecf7145ac Co-authored-by: Hyask <7489759+Hyask@users.noreply.github.com>
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.
QUEUE_STATUSESlist and export it fromlaunchpad.pyQueueStatusScreenmodal inapp.py(modeled afterSeriesScreen)f3key binding (action_switch_queue_status) toQueueAppself.queue_statusinQueueApp, default toQUEUE_STATUS_UNAPPROVEDself.queue_statustoget_queue_items()in all load pathsQueueStatusScreenand the queue status switching flow