Skip to content

OUT-3729, OUT-3717 | Improve visual appearance of the Your Actions field - #204

Merged
arpandhakal merged 15 commits into
OUT-3510from
arpandhakal/out-3729-improve-visual-appearance-of-the-your-actions-field
Jun 11, 2026
Merged

OUT-3729, OUT-3717 | Improve visual appearance of the Your Actions field#204
arpandhakal merged 15 commits into
OUT-3510from
arpandhakal/out-3729-improve-visual-appearance-of-the-your-actions-field

Conversation

@arpandhakal

@arpandhakal arpandhakal commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Changes

Revamps the "Your Actions" section on Client Home from bulky cards into compact pill rows to match the new design (OUT-3729), and fixes 0-event actions appearing for clients (OUT-3717).

  • Layout: bulky cards → compact pills. Lighter container (bg-background-primary, subtle border, rounded-md, reduced padding), sentence-case "Your actions" heading. Removed the "You have N pending items" subheading, the per-card count line, the arrow icon, and the bottom link.
  • Labels: verb sentences — Pay 2 invoices / Sign 1 contract / Submit 3 forms / Complete 2 tasks (singular noun when the count is 1). In the editor (IU) view the count renders as a short {{N}} placeholder chip.
  • Responsive grid (container queries) — responds to the card's own width, so the narrow editor column is no longer crammed:
    • 4 actions → 4 columns (fill); 3 actions → 3 columns (fill)
    • 1–2 actions → third-width, left-aligned, leaving space on the right (per the per-count designs)
    • collapses to 2 / 1 columns on narrower widths
  • OUT-3717 — hide empty actions: in the client/preview view, actions with 0 pending events are hidden, and the whole section is not rendered when nothing is pending (no empty state). In the editor view all enabled actions stay visible (counts are placeholders) so admins can still configure them.
  • Navigation preserved: clicking a pill still posts history.push to the parent window to open the corresponding app (tasks → tasks app, others → their route). Hover affordance and navigation are both gated on clientId, so they apply in the client view but not the editor.

Testing Criteria

  • Loom: add walkthrough video
  • Client view with 1 / 2 / 3 / 4 enabled actions → 3–4 fill the row; 1–2 are left-aligned with space on the right.
  • Client with some apps at 0 events → those pills are hidden; all apps at 0 → the whole section is gone (no empty state).
  • Editor (IU) view → all enabled actions show with the {{N}} placeholder chip; sidebar toggle/reorder still works.
  • Narrow editor content column → grid collapses to 2/1 columns instead of cramming.
  • Click a pill in the client view → navigates to the correct app.
  • Dark background setting → pills / heading / borders render correctly.
  • Responsive: mobile (1 col), tablet (2 cols), desktop (per-count).

Notes

  • Stacked on OUT-3510 — this PR targets the OUT-3510 branch as its base (not main). OUT-3510 should land first.
  • Addresses OUT-3729 and OUT-3717.

Impact & Surface Area of Change

  • Touches only the Client Home "Your Actions" feature: action-item.tsx, actions-card.tsx, and a verb field added to each definition in constant.ts.
  • No backend / schema / API changes. useNotificationCounts, useEnabledActions, and useAppDisplayNames are consumed unchanged.
  • Watch for: the empty-state gating (section hidden when nothing pending) — confirm it doesn't hide the section unexpectedly; and the container-query breakpoints across real portal vs editor widths.

🤖 Generated with Claude Code

- Replace bulky cards with compact pill rows matching the new design
- Verb-sentence labels (Pay/Sign/Submit/Complete) with inline count; short {{N}} chip in editor
- Container-query grid: 4 and 3 actions fill the row; 1 and 2 stay third-width and left-align
- Hide actions with 0 pending events and the whole section when nothing is pending (OUT-3717)
- Preserve click-through navigation to the underlying apps

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jun 2, 2026

Copy link
Copy Markdown

OUT-3729

OUT-3717

@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
client-home-v3 Ready Ready Preview, Comment Jun 11, 2026 8:49am

Request Review

@arpandhakal
arpandhakal requested a review from priosshrsth June 2, 2026 11:29
@arpandhakal arpandhakal self-assigned this Jun 2, 2026
@greptile-apps

greptile-apps Bot commented Jun 2, 2026

Copy link
Copy Markdown

Greptile Summary

Replaces the bulky "Your Actions" cards with compact pill rows and fixes 0-count actions appearing in the client view. Changes touch only the three action-item files with no backend or schema impact.

  • action-item.tsx: Swaps card layout for a shared PILL_BASE pill shell (loading + loaded states pixel-identical), builds the label as {verb} {count} {noun} with singular/plural agreement in preview mode, and drops the arrow icon and count sub-line.
  • actions-card.tsx: Adds isPreviewMode && !counts guard to suppress the section until counts resolve (preventing empty-state flash), filters out zero-count actions in preview/client mode, and rewires the container-query grid to the new 1/2/3/4-column breakpoint spec.
  • constant.ts: Extends ActionDefinition with an imperative verb field (Pay, Sign, Complete, Submit) for all four action definitions.

Confidence Score: 4/5

Safe to merge; logic is self-contained and well-guarded against empty-state flashes.

The filtering and guard logic in actions-card.tsx is correct, and the pill rendering in action-item.tsx is clean. The only finding is a dead portalUrl prop carried through the diff unchanged — it poses no runtime risk but should be removed for clarity.

The portalUrl prop threading across action-item.tsx and actions-card.tsx is the one thing worth tidying before merge.

Important Files Changed

Filename Overview
src/features/action-items/components/action-item.tsx Redesigned from card to pill layout; portalUrl prop is declared and forwarded from parent but never consumed in the component body (pre-existing dead prop).
src/features/action-items/components/actions-card.tsx Adds count-based filtering in preview/client mode with a !counts guard to prevent empty-state flash; grid breakpoints correctly implement the 1/2/3/4-column design spec using container queries.
src/features/editor/components/Sidebar/Actions/constant.ts Adds verb field to ActionDefinition and each definition — straightforward data change with correct TypeScript typing via the satisfies constraint.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ActionsCard renders] --> B{isPreviewMode?}
    B -- Yes --> C{counts resolved?}
    C -- No --> D[return null\nno flash]
    C -- Yes --> E[Filter: keep actions\nwhere count > 0]
    E --> F{visibleCount > 0?}
    F -- No --> G[return null\nno empty state]
    F -- Yes --> H[Render pill grid]
    B -- No\nEditor mode --> I[visibleActions = all\nenabled actions]
    I --> J{enabledActions.length > 0?}
    J -- No --> G
    J -- Yes --> H
    H --> K[ActionItem per action]
    K --> L{isLoading?}
    L -- Yes --> M[Skeleton pill div]
    L -- No --> N[Button pill\nverb + count + noun]
    N --> O{clientId?}
    O -- Yes --> P[hover styles +\npostMessage on click]
    O -- No --> Q[Static pill\nno interaction]
Loading

Comments Outside Diff (2)

  1. src/features/action-items/components/action-item.tsx, line 8-15 (link)

    P2 The portalUrl prop is declared in the interface and forwarded from ActionsCard (portalUrl={workspace?.portalUrl}) but is never destructured or used anywhere in the component body. Navigation is handled entirely via window.parent.postMessage, so this prop is dead weight that could mislead future contributors.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

  2. src/features/action-items/components/actions-card.tsx, line 55-62 (link)

    P2 The portalUrl forwarding can be removed here once the prop is dropped from ActionItemProps — passing it keeps an unused value flowing through the tree.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "feat(OUT-3729): revamp Your Actions card..." | Re-trigger Greptile

1 and 2 action cards now cap at a fixed 240px width and left-align in both the
editor (IU) and client views, so space stays on the right regardless of which
view renders them. Also lower the fill breakpoint to 700px so 3 and 4 actions
fill the row in the editor's content column (which sits just under 768px due to
the customization sidebar).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert the container-query breakpoints and the capped card width to rem
(400px->25rem, 700px->43.75rem, 240px->15rem). No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@priosshrsth priosshrsth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@arpandhakal lgtm. Screenshots would have been helpful in this case though.

arpandhakal and others added 12 commits June 3, 2026 14:34
Replace the static time-of-day greeting with an editable, autofill-capable
header. The heading defaults to "Welcome, {{client.firstName}}" and both the
heading and subheading are now minimal single-line rich-text fields that
support plain text + autofill fields only (no marks, lists, tables, etc).

- Add MinimalEditor + getMinimalExtensions (Document content:'block' for
  single-line, Paragraph, Text, UndoRedo, reused AutofillField, Placeholder)
- Add settings.heading column (HTML, default "Welcome, {{client.firstName}}");
  subheading now stores HTML and is backward compatible with existing plain text
- Wire heading through the store, change-detection and save payload
- Scope .minimal-editor CSS so global .tiptap block styles don't leak in
- Remove the now-unused getTimeOfDay greeting helper

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The change-detection baseline kept the subheading in its legacy plain-text
form (e.g. "Here's …") while the editor always emits "<p>…</p>", so reverting
a subheading edit never string-matched the baseline and the Save Changes button
stayed visible. The heading was unaffected because its default is already
canonical "<p>…</p>".

Normalize heading/subheading to the editor's canonical serialization when a
non-canonical value loads, updating the live value and the change-detection
baseline atomically via a new syncCanonicalContent store action.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…205)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Autofill fields are an inline atom TipTap node rendered via a React
NodeView. In client/preview view the resolved value was neither
selectable/copiable nor clickable when it was a link.

- Add `renderText` to the autofill node so TipTap's clipboard text
  serializer emits the resolved value (template `{{...}}` falls back when
  no preview client is available, e.g. in the editor). Resolution happens
  outside React via a store/query-cache helper.
- Render resolved URLs and emails as anchors styled with the editor's
  `cop-text-link cursor-pointer` classes; `stopPropagation` on mousedown
  lets native navigation work in the readonly view.

Both fixes live on the shared extension/NodeView, so the minimal editor
(home header/subheading) inherits them automatically.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
OUT-3841 | Home App - Autofill Fields Are Not Copiable or Clickable
feat(OUT-3510): make home page header editable with autofill
@arpandhakal
arpandhakal merged commit 6eca1c6 into OUT-3510 Jun 11, 2026
6 of 7 checks passed
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