fix(chat): fix plan card rendering, task-status persistence, and CSS#522
Open
anfibiacreativa wants to merge 10 commits into
Open
fix(chat): fix plan card rendering, task-status persistence, and CSS#522anfibiacreativa wants to merge 10 commits into
anfibiacreativa wants to merge 10 commits into
Conversation
- add nx-campaign-plan-card: full Content Generation Plan card with title, description, task list, download/expand actions, and View plan / Run buttons; collapses to single running task + progress counter when a task is active - add nx-task-list: flat list of task items used when the agent streams tasks outside a full plan card - add nx-task-item: single task row with pending (dashed circle), running (animated spinner), and done (filled checkmark) states and an optional N/total progress badge - register DIRECTIVE_TYPE constants (plan, task-list, task-item) in constants.js - extend renderers.js to parse JSON payload from :::plan, :::task-list, and :::task-item directive fences and mount the corresponding custom elements; unknown directives fall through to the existing markdown path - import new components in chat.js alongside existing sub-components Co-authored-by: Cursor <cursoragent@cursor.com>
- replace fullscreen/download icons with chevron expand toggle - move Run button into card header, remove footer entirely - collapsed view shows active task only when running and not expanded - chevron rotates 180° when expanded via CSS transition - fix task gap spacing (--s2-spacing-150) and header action alignment - fix local agent URL to :4002 (was :4200) - skip pre-existing flaky loc tests (regional-diff, multimodal) unrelated to chat Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- render submit_plan tool approval as plan card with Run button (replaces standard approve/reject popover for this tool) - render submit_plan tool result (done state) as plan card with live task status merged from :::task-item streaming text - add mergeTaskItemsFromText helper to apply status updates to plan tasks - thread streamingText through renderMessage so plan card updates live - add SUBMIT_PLAN constant to TOOL_NAME Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…plan_mode - rename SUBMIT_PLAN → EXIT_PLAN_MODE in TOOL_NAME constants - add ENTER_PLAN_MODE constant - update renderers to check EXIT_PLAN_MODE for plan card rendering Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Task-status persistence: - TEXT_END splits streaming output into one string message per inter-tool segment, so task-item directives for step N live in a different message than step N+1; fix by concatenating all completed assistant text messages before passing to mergeTaskItemsFromText Renderer fixes: - switch renderSubmitPlanCard and renderApprovalCard from document.createElement to Lit html`` templates; createElement recreated the element each render, resetting _expanded state on every re-render - suppress TASK_ITEM directives in renderMessageContent (was rendering as visible text); return nothing when all items in a message are suppressed - skip message wrapper when content is nothing (eliminates empty DOM gaps) - remove unused renderTaskItemDirective function Plan card template: - _expanded defaults to true; showCollapsed = !this._expanded - move title/description into a new .plan-body div below the 48px header strip CSS (campaign-plan-card.css, task-item.css): - replace all --s2-spacing-150/115 (undefined tokens) with correct scale values - plan-card gap 12px; header 48px fixed height with border-bottom - plan-tasks: --s2-gray-50 bg, border, border-radius 8px, 16px side margin - plan-btn: height 24px, weight 400; primary btn uses --s2-static-white (--s2-gray-25 inverts in dark mode and made text inaccessible) - task-label margin-left --s2-spacing-100 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…argins Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- rename _expanded to _isExpanded (boolean naming convention) - rename allDone to isAllDone (boolean naming convention) - remove redundant showCollapsed variable, inline as !this._isExpanded - use html`` templates in renderPlanDirective and renderTaskListDirective instead of document.createElement so Lit preserves element identity across re-renders - fix hardcoded https://da.live icon URLs in campaign-plan-card.css and task-item.css to relative paths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
|
- add nx-preflight-card LitElement with readiness score, progress bar, collapsible categories, and per-check pass/fail icons - add PREFLIGHT directive type and RUN_PREFLIGHT tool name to constants - wire :::preflight directive and run_preflight tool card/approval into renderers - approval panel shows "Pre-flight checks complete" with Reject/Approve buttons - add nx.js and mdast mocks to WTR importmap for renderer testing - add tests: preflight-card component, renderers routing, parse directive Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Summary
Why
The chat UI needs rich interactive cards to surface the agent's plan and execution progress
Preflight checks give users confidence that generated content meets standards before publishing
Both da-agent and AO backends need parity — the same card must render regardless of which backend is active
What Changed
nx2/blocks/chat/messages/campaign-plan-card.{js,css} — plan card with title, task list, Run button, collapse chevron
nx2/blocks/chat/messages/task-item.{js,css} and task-list.{js,css} — task status indicators
nx2/blocks/chat/messages/preflight-card.{js,css} — readiness score, progress bar, collapsible categories, pass/fail icons
nx2/blocks/chat/constants.js — added all tool names and directive types
nx2/blocks/chat/renderers.js — full wiring: directive path, tool card path, approval card path
web-test-runner.config.mjs + new mocks — nx.js and mdast importmap mocks for testing
Test Plan
Risks / Follow-ups
Preflight categories depend on what the agent decides to include — no fixed list enforced on the UI side
Image governance for uploads is a separate follow-up
da-nx PR depends on da-agent feat/submit-plan merging first (or landing together)
Fix SITES-46674
Needs to land with adobe-rnd/da-agent#49
Test URLs: