Skip to content

Polish transfer UI with hero CTAs, status pill, motion, and compact logs - #7

Merged
interfluve-wav merged 1 commit into
mainfrom
feature/transfer-ui-polish
Aug 16, 2026
Merged

interfluve-wav merged 1 commit into
mainfrom
feature/transfer-ui-polish

Conversation

@interfluve-wav

@interfluve-wav interfluve-wav commented Aug 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

UI/UX polish pass on the transfer workflow, following up the v0.1.8 daisyUI redesign:

  • Hero CTAs: full-width primary actions (cta-primary) for Start / Cancel / "Start another transfer"; the Send button now reads "Send N files" when paths are staged.
  • Status pill: compact color-coded status pill in the footer (pulsing dot while transferring, aria-live="polite"), replacing the plain workflow-status line.
  • Compact status log: new appendLogLine util collapses consecutive duplicate croc output lines into a ×N counter (log capped at 200 lines), with 8 new vitest cases in logUtils.test.ts.
  • Motion: staggered panel entrances, button hover/press feedback, smooth progress-bar fill, modal pop-in, status-pill color cross-fades.
  • Chevrons: collapsible toggles (Options, Advanced network, Recent transfers, Status log) render a static ▸ rotated open via [aria-expanded] CSS.
  • Footer consolidation: credits moved into the About dialog (schollz/croc, GUI repo, Credits links); "Clear history" moved inside the collapsible history block.

Type

  • Feature

Test plan

  • cd gui && npm run build
  • cd gui && npm run test:rust (39 passed)
  • cd gui && npm test (51 vitest cases, incl. 8 new logUtils tests)
  • Manual: Send and/or Receive smoke test (if UI changed)

Notes

  • Frontend-only change (gui/src/App.tsx, gui/src/App.css, new gui/src/logUtils.ts + tests); no Rust/backend modifications.
  • History note: this commit briefly landed on main directly and was moved here via force-push so it goes through review.

Summary by CodeRabbit

  • New Features

    • Refreshed the interface with clearer controls, animated status indicators, improved panels, and a redesigned footer.
    • Added convenient post-transfer actions to start a new transfer or resend the same files.
    • Added repository and credits links in the application footer.
    • Transfer logs now collapse consecutive duplicates and retain a manageable number of entries.
  • Bug Fixes

    • Improved log handling to prevent excessive or repetitive output.
  • Tests

    • Added coverage for duplicate handling, log limits, and custom retention settings.

Note

Polish transfer UI with hero CTAs, status pill, motion, and compact logs

  • Adds full-width primary CTA buttons for key transfer actions (send, receive, cancel); the Start transfer button dynamically shows the selected file count.
  • Introduces an animated status pill in the footer that shows a pulsing dot during active transfers, replacing the separate workflow-status paragraph.
  • Adds rise/pop-in motion animations to the header, footer, and main panels with staggered delays; respects prefers-reduced-motion.
  • Collapses consecutive duplicate log lines with a ×N suffix via a new logUtils.ts utility, capped at 200 lines; covered by unit tests in logUtils.test.ts.
  • Chevron rotation on collapsible sections (options, log, history) is now CSS-driven via aria-expanded instead of toggled in JS.
📊 Macroscope summarized e54c8b6. 2 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The GUI now uses bounded, duplicate-collapsing transfer logs. It also updates transfer controls, disclosure indicators, footer status content, responsive layout, and motion styling.

Changes

GUI update

Layer / File(s) Summary
Bounded transfer log retention
gui/src/logUtils.ts, gui/src/App.tsx, gui/src/logUtils.test.ts
appendLogLine collapses consecutive duplicate lines and limits retained logs. Transfer output and tests use the new utility.
Transfer controls and status layout
gui/src/App.tsx, gui/src/App.css
Transfer actions, disclosure indicators, history controls, footer status, shortcuts, and credits use the updated layout and content.
Responsive styling and motion
gui/src/App.css
Controls, CTAs, logs, status pills, footer elements, transitions, focus states, and entrance animations are updated.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main UI polish, status pill, motion, hero CTA, and compact log changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/transfer-ui-polish

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread gui/src/logUtils.ts
/** Matches a trailing repeat counter added by `appendLogLine` ("line ×3"). */
const REPEAT_SUFFIX = /^(.*) ×(\d+)$/s;

/**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium src/logUtils.ts:7

appendLogLine misinterprets a genuine croc line ending in ×N as one of its own collapsed repeats. For example, if the log contains "error ×3" (raw croc output) and the next incoming line is "error", the function treats them as duplicates and rewrites the entry to "error ×4", silently corrupting the original message and inflating the repeat count. This happens because REPEAT_SUFFIX matches any ×N suffix, so there's no way to distinguish a suffix produced by this function from text croc actually emitted. Consider tagging generated suffixes (e.g. a non-printable separator or distinct marker) so real croc output is never mistaken for a collapsed repeat.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @gui/src/logUtils.ts around line 7:

`appendLogLine` misinterprets a genuine croc line ending in `×N` as one of its own collapsed repeats. For example, if the log contains `"error ×3"` (raw croc output) and the next incoming line is `"error"`, the function treats them as duplicates and rewrites the entry to `"error ×4"`, silently corrupting the original message and inflating the repeat count. This happens because `REPEAT_SUFFIX` matches any `×N` suffix, so there's no way to distinguish a suffix produced by this function from text croc actually emitted. Consider tagging generated suffixes (e.g. a non-printable separator or distinct marker) so real croc output is never mistaken for a collapsed repeat.

Comment thread gui/src/logUtils.ts
const base = match ? match[1] : last;
if (base === line) {
const count = match ? Number.parseInt(match[2], 10) + 1 : 2;
return [...prev.slice(0, -1), `${line} ×${count}`];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium src/logUtils.ts:25

appendLogLine bypasses the max cap when the new line duplicates the last line. For example, appendLogLine(["a", "a"], "a", 1) returns two entries instead of one. The duplicate-collapse branch returns [...prev.slice(0, -1), ...] without trimming to max, so it can exceed the cap. Consider applying slice(-(max - 1)) (or equivalent) before returning in the duplicate branch.

-      return [...prev.slice(0, -1), `${line} ×${count}`];
+      return [...prev.slice(0, -1).slice(-(max - 1)), `${line} ×${count}`];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @gui/src/logUtils.ts around line 25:

`appendLogLine` bypasses the `max` cap when the new line duplicates the last line. For example, `appendLogLine(["a", "a"], "a", 1)` returns two entries instead of one. The duplicate-collapse branch returns `[...prev.slice(0, -1), ...]` without trimming to `max`, so it can exceed the cap. Consider applying `slice(-(max - 1))` (or equivalent) before returning in the duplicate branch.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gui/src/App.css`:
- Around line 507-513: Update the background value in the .status-dot rule to
use the Stylelint-compliant lowercase CSS keyword currentcolor, unless the
project’s established convention requires changing the value-keyword-case
configuration instead.

In `@gui/src/logUtils.ts`:
- Around line 17-28: Update appendLogLine to validate max, return an empty array
when max is zero, and ensure every return path is capped to max entries,
including duplicate compression and oversized prev inputs. Add tests covering
max = 0 and an oversized prev whose last line duplicates the appended line.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 52a8cb4c-80d1-48ff-bb82-c298d1f3e689

📥 Commits

Reviewing files that changed from the base of the PR and between dffd2aa and e54c8b6.

📒 Files selected for processing (4)
  • gui/src/App.css
  • gui/src/App.tsx
  • gui/src/logUtils.test.ts
  • gui/src/logUtils.ts

Comment thread gui/src/App.css
Comment on lines +507 to +513
.status-dot {
width: 0.5rem;
height: 0.5rem;
border-radius: 50%;
background: currentColor;
flex-shrink: 0;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the Stylelint keyword-case error.

The configured value-keyword-case rule rejects currentColor. Change it to currentcolor, or update the Stylelint rule if camel-case CSS keywords are the project convention.

-  background: currentColor;
+  background: currentcolor;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.status-dot {
width: 0.5rem;
height: 0.5rem;
border-radius: 50%;
background: currentColor;
flex-shrink: 0;
}
.status-dot {
width: 0.5rem;
height: 0.5rem;
border-radius: 50%;
background: currentcolor;
flex-shrink: 0;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 511-511: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gui/src/App.css` around lines 507 - 513, Update the background value in the
.status-dot rule to use the Stylelint-compliant lowercase CSS keyword
currentcolor, unless the project’s established convention requires changing the
value-keyword-case configuration instead.

Source: Linters/SAST tools

Comment thread gui/src/logUtils.ts Resolved
@interfluve-wav
interfluve-wav merged commit f0cef56 into main Aug 16, 2026
11 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.

1 participant