Skip to content

feat: add group-colored terminal wave accents - #291

Merged
shihuili1218 merged 5 commits into
rssh-org:mainfrom
njxz:codex/group-terminal-waves
Oct 19, 2026
Merged

shihuili1218 merged 5 commits into
rssh-org:mainfrom
njxz:codex/group-terminal-waves

Conversation

@njxz

@njxz njxz commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Saved SSH, Telnet and serial connections can be hard to distinguish by environment. This adds opt-in group-colored gradient waves as a right-side terminal background, with a live preview in group settings. The accent occupies no terminal rows, has no group-name label, and leaves glyphs and the selected terminal palette intact.

The approved effect uses three translucent wave layers, offset by 39% of a half-cycle so one crest flows into another layer's trough. The accent spans 23% of the pane (capped at 230px), uses 1.45× wavelength and 0.9× ambient speed, and softens edges by 3px. Startup holds a 12× rush before easing to normal over 2.2 seconds, with up to 1.15× horizontal amplitude. Reduced-motion preferences produce a static background. Each pane owns and disposes its animations; narrow and split panes keep their full terminal area.

Group edits and connection reassignment update open terminals through resource-scoped notifications. Manual GitHub/WebDAV pulls, automatic pulls and JSON imports now notify the union of pre/post-import group and connection IDs, including partial imports that commit valid rows before reporting errors. Detached windows refresh without reloading; notification failure does not turn a completed import into a failure.

Migration 31 persists the optional setting through the existing Group export/sync contract. Older payloads default to waves disabled. Headless clients reuse the existing authenticated WebSocket relay for scoped configuration events.

Entry points

  • Desktop GUI: group toggle and preview, background behind terminal text, split panes and detached-window updates.
  • Mobile GUI: shared background with a narrower width; reduced motion supported. No physical-device test.
  • CLI: existing group add/edit/list support is preserved. Animation is GUI-only; a separately running CLI process does not broadcast into GUI processes.
  • Headless / JetBrains: shared frontend and scoped event relay. Independent browser clients were tested; JetBrains itself was not separately exercised.

Validation

  • npm test: 791 tests passed, including startup easing, subscription lifecycle and successful/partial import notifications.
  • npm run build: passed.
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check: passed.
  • cargo test --manifest-path src-tauri/Cargo.toml --features cli,server: 751 library tests and 6 CLI tests passed; one existing doc test ignored. The process-group test required execution outside the sandbox.
  • Native Tauri: right-side waves behind text and split panes checked with an isolated localhost Telnet session.
  • Independent Headless clients: successful and partial JSON imports changed the already-open terminal's color immediately. Terminal and wrapper heights both remained 675px with the accent enabled.

Preview

Approved layered wave settings and preview

@shihuili1218

Copy link
Copy Markdown
Collaborator

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T08:40:52.105241Z b2097a9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b22beb544a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/components/GroupManager.svelte Outdated
};
try {
await invoke("update_group", { group });
invalidateConfiguration();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Broadcast group invalidations across terminal windows

When a grouped SSH or Telnet tab is opened through open_tab_in_new_window, this call only increments _configurationRevision in the current webview's instance of sync.svelte.ts; the new Tauri window boots an independent frontend instance. Its TerminalPane therefore never reruns the profile/group lookup after a group is renamed, recolored, enabled/disabled, or reassigned in another window, leaving the footer stale until that window reloads. Broadcast the invalidation across webviews instead of relying solely on module-local state.

Useful? React with 👍 / 👎.

Comment on lines +34 to +36
flex: 0 0 auto;
width: 100%;
height: clamp(64px, 15%, 150px);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Let the wave footer shrink with split panes

With waves enabled in a top/bottom split inside a normally tall window, the max-height media query still measures the whole viewport, while this non-shrinking flex child keeps a 64px minimum. The split layout permits 20% ratios and nested splits, so the footer plus the 28px pane header can consume nearly all of a valid small pane and leave xterm with only a few rows or no usable canvas. Size the footer from its pane (for example with a container query) or allow it to shrink with the flex container.

AGENTS.md reference: AGENTS.md:L47-L47

Useful? React with 👍 / 👎.

@njxz

njxz commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi maintainers, the latest Tests workflow is awaiting maintainer approval, so no CI jobs have started yet. Could you please approve the run when you have a chance?

Workflow run: https://github.com/rssh-org/rssh/actions/runs/38846968676

Thank you!

@shihuili1218

Copy link
Copy Markdown
Collaborator

@codex

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a6461650a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/terminal/environment-events.ts Outdated
export async function notifyEnvironmentChanged(kind: "group" | "connection", id: string): Promise<void> {
invalidateConfiguration();
try {
await emit(environmentEvent(kind, id));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Broadcast sync invalidations to detached terminal windows

When a GitHub/WebDAV pull (including the automatic pull in sync.svelte.ts) or ImportExportScreen.doImport changes a group's color/name/wave flag or a profile's group_id, this emit path is never called: only GroupManager and the three profile editors invoke notifyEnvironmentChanged, while sync only increments the initiating webview's module-local revision and import increments none. A terminal detached with open_tab_in_new_window therefore never reruns watchEnvironmentGroup and keeps the old environment marker until reload; broadcast the affected group/profile IDs through this scoped event path after these merges too.

AGENTS.md reference: AGENTS.md:L13-L15

Useful? React with 👍 / 👎.

@shihuili1218

Copy link
Copy Markdown
Collaborator

Good job! add a small suggestion:

Please remove the group name and blend the wave into the terminal content area as a background, without taking up space. Position it on the right instead of the bottom, where commands are entered.

@njxz

njxz commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion! I agree—I'll remove the group name and blend the wave into the right side of the terminal background so it doesn't take up any space or interfere with command input.

@njxz

njxz commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Updated as suggested:

  • Removed the group name and moved the waves to the right side, behind the terminal content, without taking up terminal space.
  • Refined the effect into a dynamic wave background using the group color.
  • Added a brief startup surge that smoothly settles into a gentle continuous flow, while respecting reduced-motion preferences.
  • Fixed cross-window updates after GitHub/WebDAV sync and JSON imports, including partial imports.
    The visual settings have been reviewed locally.
    Latest commit: dbbd1de. Thanks for the suggestions!
图片

@njxz

njxz commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author
rssh-dynamic-wave-background

@shihuili1218

Copy link
Copy Markdown
Collaborator

LGTM

Use static group-colored backgrounds and snapshot settings per terminal. Remove live configuration linkage, migrate the wave flag to schema v32, and preserve clone metadata, input focus, and image export colors. Remove obsolete wave screenshots.
@shihuili1218
shihuili1218 merged commit 4e668ff into rssh-org:main Oct 19, 2026
1 check 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