Skip to content

fix: explain the Follow log switch with a tooltip - #7145

Open
superplanehq-integration[bot] wants to merge 1 commit into
mainfrom
fix/split-run-follow-tooltip
Open

superplanehq-integration[bot] wants to merge 1 commit into
mainfrom
fix/split-run-follow-tooltip

Conversation

@superplanehq-integration

Copy link
Copy Markdown
Contributor

Summary

The Follow toggle in the Automations log header showed only the bare
label "Follow", with no hint about what it does. Users could not tell
that it auto-scrolls the log to the newest output, and the effect was
invisible when the log was short or a run was not active.

This adds a tooltip to the existing Follow switch (SplitRunLogHeader.tsx)
explaining its purpose, plus a small ChevronsDown icon as a visual hint
that it controls scroll position. The change is frontend-only and does
not touch the follow/auto-scroll logic in useFollowLogScroll.ts /
followLogScroll.ts.

Because SplitRunFollowSwitch is the shared control, both usages get
the fix:

  • WorkOrderSplitRunPopup.tsx (Automations tab)
  • FactoryAppSplitRunPage.tsx (via SplitRunLogHeader)

The visible and accessible switch name stays "Follow", so existing
tests that query getByRole("switch", { name: "Follow" }) keep
passing unchanged. Radix's Tooltip/TooltipTrigger already wires up
aria-describedby on the trigger element automatically when the
tooltip is open, so no extra ARIA wiring was needed.

Test plan

  • make format.js
  • make check.lint.ui
  • make check.build.ui
  • npx vitest run for the work-order-split-run folder (357 tests
    pass), including the new tooltip test in
    WorkOrderSplitRun.follow.spec.tsx
  • Confirmed existing getByRole("switch", { name: "Follow" })
    assertions in WorkOrderSplitRun.spec.tsx,
    FactoryAppSplitRunPage.spec.tsx, and LinesPage.spec.tsx still
    pass

The Follow switch in the Automations log header had only the bare
label "Follow" with no explanation of what it does or why it
matters. Users could not tell that it auto-scrolls the log, and the
effect was invisible when the log was short or the run was idle.

Wrap the switch in a Tooltip that explains its purpose ("Auto-scroll
the log to the newest output.") and add a ChevronsDown icon as a
visual hint. The visible and accessible switch name stays "Follow"
so existing tests keep passing; Radix Tooltip already wires up
aria-describedby on the trigger automatically.

Add a test asserting the tooltip text appears on hover.

Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com>
Co-authored-by: André Calil <andre@superplane.com>
@superplanehq-integration

Copy link
Copy Markdown
Contributor Author

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

@superplanehq-integration

Copy link
Copy Markdown
Contributor Author

Maintainers: comment /deploy-storybook to get a Storybook link for this PR.

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.

1 participant