Skip to content

chore: various fixes and improvements for v2 runs - #2605

Draft
camielvs wants to merge 1 commit into
masterfrom
07-31-chore_various_fixes_and_improvements_for_v2_runs
Draft

chore: various fixes and improvements for v2 runs#2605
camielvs wants to merge 1 commit into
masterfrom
07-31-chore_various_fixes_and_improvements_for_v2_runs

Conversation

@camielvs

@camielvs camielvs commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR is a round of small polish fixes and quality-of-life improvements for the new (v2) runs view. None of them are big new features — they're the little things that make inspecting a run feel smoother and less confusing. In short:

  • Run info now tells you how a run was started — a friendly note shows whether it came from the Tangle app or was kicked off via AI/CLI (this existed in the old view but had gone missing here).
  • The AI assistant is smarter about what it offers — instead of always suggesting "Why did this run fail?", the quick prompts now match what actually happened (still running, succeeded, or failed).
  • Getting to logs is easier — clicking "Open Logs" on a task now opens the properties panel straight to the Logs tab instead of spawning a separate window, and there's a "pop out" option if you do want logs in their own floating window. (Popped-out log windows are intentionally left out of the top-level Windows menu for now — closing one no longer leaves a stale entry behind.)
  • The properties panel behaves as expected — if you close it and then click a task, it reopens (previously nothing happened).
  • A handful of visual fixes — dark-mode colours that were too harsh or hard to read, text that got cut off or overflowed in narrow panels, and buttons that were stretched full-width now sit at a sensible fixed size.
  • The collapsed Run Tools sidebar shows real buttons — when the run-tools dock is collapsed, the actions (view YAML, inspect, clone, cancel, rerun) now appear as a compact vertical strip of icon buttons instead of hiding behind a popover.
  • You can submit a run with arguments from the compact view — previously the collapsed submit button couldn't do this. In the compact editor bar exactly one submit button now shows: "run with arguments" when the pipeline has configurable inputs, otherwise the normal run button.

The goal is simply to make the v2 runs view feel more consistent, more polished, and closer to (or better than) the old view it's replacing.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • Improvement

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

image.png

Test Instructions

Open a v2 run and check the fixes above feel right:

  1. Run info — the source note appears and reads correctly for a run started from the app vs. programmatically.
  2. AI assistant — the suggested prompts match the run's outcome (a passed run should not ask "why did it fail?").
  3. Logs — "Open Logs" on a task opens the properties panel on the Logs tab; the "pop out" option opens a floating logs window. Close a popped-out log window and confirm it does not linger in the Windows menu.
  4. Properties panel — close it, then click a task; it should reopen.
  5. Dark mode — the cancel button red and the selected-prompt header both look right.
  6. Narrow panels — long values and the artifact-expiry warning wrap instead of getting cut off or overflowing.
  7. Collapsed Run Tools — collapse the Run Tools dock and confirm the actions render as icon buttons in the sidebar rail (not behind a popover), each with a tooltip.
  8. Compact submit — collapse the editor menu bar and confirm exactly one submit button shows: "run with arguments" for a pipeline with inputs, otherwise the plain run button — never both at once.

Additional Comments

Copilot AI review requested due to automatic review settings July 31, 2026 23:53
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 07-31-chore_various_fixes_and_improvements_for_v2_runs/2a4cd40

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bundles a set of UI and UX improvements across the v2 Run View and related shared components/stores, including better context-panel behavior (task details/logs), richer run metadata display, and multiple layout/styling tweaks.

Changes:

  • Refactors task “Open Logs” behavior to route through the context panel (with a new “Pop out” logs action) and adds selection clearing on context-panel close.
  • Enhances Run View details with run-source messaging derived from run annotations, and upgrades the AI Assistant’s suggested prompts based on run status.
  • Improves UI consistency and overflow handling (sticky header background, InfoBox/CopyText wrapping, tool/action button styling).

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/routes/v2/shared/windows/components/WindowStickyHeader.tsx Uses theme background token for docked sticky header.
src/routes/v2/shared/store/editorStore.ts Adds pendingTaskDetailTab state + setter to coordinate tab switching.
src/routes/v2/pages/RunView/nodes/TaskNode/RunViewTaskNode.tsx Routes “Open Logs” through selection + pending tab instead of opening a logs window.
src/routes/v2/pages/RunView/nodes/TaskNode/context/RunViewTaskDetails.tsx Makes task details tabs controlled, supports pending-tab selection, and adds “Pop out” logs action.
src/routes/v2/pages/RunView/hooks/useRunViewSelectionSync.tsx Clears editor selection when the context panel window closes.
src/routes/v2/pages/RunView/hooks/useAiChatWindow.tsx Computes AI suggested prompts dynamically from overall run status.
src/routes/v2/pages/RunView/components/RunToolsContent.tsx Adjusts tool button sizing and centralizes cancel styling.
src/routes/v2/pages/RunView/components/RunDetailsContent.tsx Fetches run annotations to display run source message in details.
src/routes/v2/pages/RunView/components/RunActionsBar.tsx Promotes common actions (inspect/clone/cancel/rerun) into the main action bar.
src/routes/v2/pages/Editor/components/EditorMenuBar/components/QuickRunButton.tsx Adds a mini “submit with arguments” button when inputs exist and there are no errors.
src/components/shared/RunSource.tsx Adds a run-source message API and exports getRunSourceBucket.
src/components/shared/InfoBox.tsx Improves wrapping/overflow behavior for title/content rows.
src/components/shared/CopyText/CopyText.tsx Ensures CopyText wrapper respects container width constraints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +46 to +51
useEffect(() => {
if (pendingTab) {
setActiveTab(pendingTab);
editor.setPendingTaskDetailTab(null);
}
}, [pendingTab, editor]);
Comment on lines 21 to 25
const {
task,
status,
disabledCache,
executionId,
showLogsButton,
};

const FAILED_STATUSES = new Set(["FAILED", "SYSTEM_ERROR", "INVALID"]);
const IN_PROGRESS_STATUSES = new Set([

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This is an AI-generated code review comment.

This IN_PROGRESS_STATUSES set is a byte-for-byte copy of the private one in executionStatus.ts:65. This file already imports from that module, so this duplicates domain knowledge (the canonical list of in-progress statuses) that will silently drift if the source of truth changes.

Suggest export-ing the existing set from executionStatus.ts and importing it here. (FAILED_STATUSES has no existing equivalent, so keeping it local is fine — or co-locate it in executionStatus.ts too.)

import type { ExecutionStatusStats } from "@/utils/executionStatus";
import { tracking } from "@/utils/tracking";

const CANCEL_ACTION_CLASS_NAME =

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This is an AI-generated code review comment.

This destructive text/hover recipe is nearly identical to CANCEL_TOOL_CLASS_NAME introduced in RunToolsContent.tsx in this same PR (that one just adds border classes). Worth defining the shared dark-mode override once and appending the border classes where needed, rather than maintaining two copies. Low priority — fine to defer.

icon: "AppWindow",
label: "Web app",
tooltip: "Submitted via Tangle web app",
message: "Generated via Tangle UI",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This is an AI-generated code review comment.

Minor copy nit: the new message strings diverge in verb/product naming from the existing tooltip for the same bucket — "Generated via Tangle UI" vs tooltip "Submitted via Tangle web app", and "Submitted via AI or CLI" vs tooltip "Submitted by AI or via CLI". Since both describe the same source, consider aligning the wording (or confirm the difference is intentional).

Copilot AI review requested due to automatic review settings August 1, 2026 01:07
@camielvs
camielvs force-pushed the 07-31-chore_various_fixes_and_improvements_for_v2_runs branch from 265f9d5 to 87aa036 Compare August 1, 2026 01:07
@camielvs
camielvs force-pushed the 07-31-chore_various_fixes_and_improvements_for_v2_runs branch from 87aa036 to 2a4cd40 Compare August 1, 2026 01:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.

Suppressed comments (4)

src/routes/v2/pages/RunView/nodes/TaskNode/context/RunViewTaskDetails.tsx:76

  • When switching from a non-subgraph task (where the Logs tab exists) to a subgraph task (where Logs is hidden), activeTab can remain set to "logs", causing the Tabs to render no content. Add a guard to reset activeTab to a valid value when Logs is not available.
  const taskSpecForIO = { componentRef } as TaskSpec;

  const handlePopOutLogs = () => {
    if (!executionId) return;
    windows.openWindow(<Logs executionId={executionId} status={status} />, {

src/routes/v2/pages/RunView/hooks/useAiChatWindow.tsx:35

  • The new getRunSuggestedPrompts() branching is user-facing behavior that depends on server status values; it would be easy to regress (e.g., CANCELLED/SKIPPED handling). Consider adding a small unit test suite covering representative statuses and expected prompt labels/icons (similar to other RunView hook tests).
function getRunSuggestedPrompts(status: string | undefined): SuggestedPrompt[] {
  if (status && FAILED_STATUSES.has(status)) {
    return [
      SUMMARIZE_PROMPT,
      { label: "Why did this run fail?", icon: "CircleAlert" },

src/routes/v2/pages/RunView/hooks/useAiChatWindow.tsx:53

  • getRunSuggestedPrompts() treats cancelled/skipped runs as the generic "success" case, which can produce misleading suggestions like "Explain the outputs" for CANCELLED/SKIPPED overall statuses (both are valid server statuses per utils/executionStatus). Add explicit handling for these terminal statuses.

This issue also appears on line 31 of the same file.

function getRunSuggestedPrompts(status: string | undefined): SuggestedPrompt[] {
  if (status && FAILED_STATUSES.has(status)) {
    return [
      SUMMARIZE_PROMPT,
      { label: "Why did this run fail?", icon: "CircleAlert" },

src/components/shared/RunSource.tsx:22

  • The web-app run source message says "Generated via Tangle UI", which is inconsistent with the tooltip wording ("Submitted via Tangle web app") and the intent of describing how the run was started/submitted. Consider using consistent "Submitted via …" phrasing.
    message: "Generated via Tangle UI",

Copilot AI review requested due to automatic review settings August 1, 2026 01:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/routes/v2/pages/RunView/nodes/TaskNode/context/RunViewTaskDetails.tsx:48

  • activeTab is kept in component state across entityId changes, so switching from a normal task (where you selected the "logs" tab) to a subgraph task (which doesn't render a "logs" tab) can leave Tabs controlled with an invalid value and render an empty panel until the user re-selects a tab. Resetting the active tab when entityId changes avoids this and still lets the pending-tab effect override to "logs" when requested (e.g. from the node-level Open Logs button).
  const [activeTab, setActiveTab] = useState("artifacts");
  const pendingTab = editor.pendingTaskDetailTab;
  useEffect(() => {
    if (pendingTab) {
      setActiveTab(pendingTab);

src/components/shared/RunSource.tsx:22

  • The new user-facing run source message for "web-app" says "Generated via Tangle UI", but the tooltip (and the intent described in the PR) uses "Submitted" wording. Keeping the message aligned with the tooltip reduces confusion about what the source represents (submission origin vs. artifact generation).
    message: "Generated via Tangle UI",

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.

2 participants