fix(widgets): sanitize and escape subprocess output to prevent MarkupError crash - #19
Merged
Conversation
_discover_stacks() previously returned an empty list when
/usr/share/ublue-os/{nvidia,amd}-stacks/ did not exist. This made
the Stacks tab blank on dev machines and on any system where the
image has not yet installed the stacks into /usr/share.
Now falls back to the bundled stacks/ directory inside the package
(stacks/amd/ or stacks/nvidia/) so the catalog is always populated.
Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ollama on Linux has known issues. RamaLama is the OCI-native replacement — it auto-detects ROCm, uses quay.io/ramalama/ramalama, exposes an OpenAI-compatible API on port 8080, and serves llama3.2:3b by default (4 GB VRAM, same slot order 10). Assisted-by: Claude Sonnet 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace GpuCard (5-row AdwPreferencesGroup) with GpuStatusBar — a single compact line: vendor · VRAM · kfd status · render group status - Add render group check (_check_render_group) shown inline in status bar - Add STACK_ARCH field (strix-halo) to Llama Strix and Llama Vulkan; arch badge shown in list and detail pane title - Add STACK_LONG_DESC to all 6 AMD stacks; detail pane shows full description instead of the truncated one-liner - Remove action hints from detail pane body — footer carries them - Collapse detail pane meta to one line: category · VRAM · disk · status - Parse arch and long_description in _discover_stacks() - No buttons anywhere in the AI screen Assisted-by: Claude Sonnet 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When deploying a KFD/ROCm stack (detected via AddDevice=/dev/kfd in the container file), check if the user is in the render group. If not, run pkexec usermod -aG render as the first step in OperationModal. - requires_kfd field on AIStack — auto-detected from container file - Preflight runs silently if user is already in render group (no extra step) - Group change is best-effort: deploy continues even if pkexec is cancelled - Note surfaced to user: change takes effect on next login No buttons. No separate modal. Fits naturally into the existing OperationModal progress flow. Assisted-by: Claude Sonnet 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…dlets
_copy_quadlets() was doing a plain file copy, leaving literal
${ROCM_VERSION} and ${NGC_MONTH} in deployed quadlet files.
podman would then fail to pull images with those strings in the tag.
Now reads stacks/amd/rocm-version and stacks/nvidia/ngc-month,
substitutes before writing to ~/.config/containers/systemd/.
File permissions are preserved via shutil.copystat.
rocm-version: 7.2.4
ngc-month: 25.06
Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…op Ollama
Toggle model:
- [s] now runs remove_stack_steps: stop + disable + delete quadlet
files + daemon-reload. Stack returns to AVAILABLE after removal.
- action_stop_stack renamed to action_remove_stack; binding label
updated from 'Stop' to 'Remove'
- Confirmation modal explains workspace data is preserved
GPU status bar:
- AMD line now appends 'ROCm X.Y.Z' from stacks/amd/rocm-version
Stack-env variable substitution:
- _copy_quadlets now reads the stack's own stack.env alongside the
global rocm-version/ngc-month files and substitutes all ${VAR}
patterns — covers LLAMA_MODEL, VLLM_MODEL, etc.
Registry:
- Removed Ollama from AI_TOOL_REGISTRY (stack dropped, CLI not recommended)
Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Covers all patterns established in this session: - AMD deployment model (kernel on host, ROCm in containers) - Bundled fallback via importlib.resources - rocm-version file, all variable substitution layers - AIStack dataclass with arch, long_description, requires_kfd fields - GpuStatusBar (single-line, no AdwPreferencesGroup) - Toggle lifecycle (Deploy/Remove, no persistent-stopped state) - Render group preflight in deploy flow - No buttons, no Ollama - Updated common-mistakes and verification checklist Assisted-by: Claude Sonnet 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…login The previous wording said the fix was 'transparent to the user' and applied at deploy time. The code reports 'effective on next login' (ai.py:607-613) and does not refresh the current session's groups, so current-session deploys can still fail if render access is required. Assisted-by: Claude Sonnet 4.6 via pi Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Error crash Escape dynamic content/subprocess output and strip ANSI escape sequences in OpsBar, and disable markup for raw text Labels in OperationModal. Assisted-by: Gemini 3.5 Flash via Copilot CLI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…GID check - Escape completed ticker steps using escape() in OpsBar to prevent MarkupError crash - Explicitly disable markup (markup=False) in ConfirmModal, InputModal, OperationLogModal, and HelpModal to prevent MarkupError crashes on brackets - Fix false positive render: not in group warning by returning True when render group is absent on host Assisted-by: Gemini 3.5 Flash via Copilot CLI Co-authored-by: Copilot <223556219+Copilot@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.
Addresses dakota #1119. Escapes dynamic content and strips ANSI escape sequences in OpsBar, and disables markup for raw text Labels in OperationModal.