Skip to content

Fix Display Issues re: TS#2324

Merged
limetech merged 3 commits into
unraid:masterfrom
Squidly271:patch-7
Aug 12, 2025
Merged

Fix Display Issues re: TS#2324
limetech merged 3 commits into
unraid:masterfrom
Squidly271:patch-7

Conversation

@Squidly271

@Squidly271 Squidly271 commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Style
    • Improved the display and formatting of Tailscale-related warning messages in the Docker container creation interface for clearer and more consistent user alerts.

@coderabbitai

coderabbitai Bot commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The update restructures the HTML/PHP template for Tailscale key expiry and route approval warnings in the Docker manager plugin. The warning label is now consistently placed before the warning messages, and message texts are wrapped in <span> elements. No changes were made to logic or public entity declarations.

Changes

Cohort / File(s) Change Summary
Tailscale Warning Markup Update
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
Adjusted the placement of the warning label and wrapped warning messages in <span> elements for Tailscale key expiry and route approval. Changed warning label formatting. No logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

A bunny hops through code so neat,
Moving warnings to the front seat.
With spans to wrap and labels clear,
The messages now appear sincere.
In Docker’s den, all warnings shine—
Markup tidy, looking fine!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4384fc3 and f13fdd3.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php (2)

1188-1193: Unify formatting & i18n for the key-expiry warning

The “expired” branch still outputs raw HTML while the “soon-to-expire” branch was updated to wrap the text in a <span>.
For consistency (and easier theming), consider wrapping the first message as well and localising the label text while you’re touching this block.

-: <b>Tailscale Key expired!</b> <a href="<?=$TS_MachinesLink?>" target='_blank'>Renew/Disable key expiry</a> for '<b><?=$TS_HostNameActual?></b>'.
+: <span><b><?=_('Tailscale Key expired!')?></b>
+  <a href="<?=$TS_MachinesLink?>" target='_blank'><?=_('Renew / disable key expiry')?></a>
+  <?=sprintf(_("for '%s'."), '<b>'.$TS_HostNameActual.'</b>')?> </span>

This keeps the two branches stylistically identical and makes the user-facing strings translatable.


1200-1202: Duplicate “:`” token – minor markdown DL artefact

Both the <b>_(Warning)_</b>: line and the subsequent : line are part of the description-list syntax, but placing a literal colon inside the bold tag produces two consecutive colons in the rendered HTML (“Warning:: …”).
Dropping the inner one avoids the double punctuation:

-<b>_(Warning)_</b>:
+<b>_(Warning)_</b>

(Existing blocks further up – e.g. Line 1136 – have the same issue; consider fixing globally when convenient.)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 18fdb23 and 471a415.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php (2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: Squidly271
PR: unraid/webgui#2293
File: emhttp/plugins/dynamix.docker.manager/include/Helpers.php:302-304
Timestamp: 2025-07-11T17:24:33.977Z
Learning: In the Unraid WebGUI Docker manager (emhttp/plugins/dynamix.docker.manager/include/Helpers.php), the xmlSecurity() function call is intentionally commented out to allow users to include < and > characters in their Docker template variables on their own servers. Default templates still explicitly disallow tags, but users can customize templates as needed in their self-hosted environment.
Learnt from: zackspear
PR: unraid/webgui#2230
File: emhttp/plugins/dynamix/include/Templates.php:63-74
Timestamp: 2025-06-03T21:27:15.912Z
Learning: In the Unraid WebGUI codebase (emhttp/plugins/dynamix/include/Templates.php), there are known duplicate ID issues in checkbox templates across multiple template instances that the maintainers are aware of but have chosen not to address due to the effort required for legacy code improvements.
Learnt from: zackspear
PR: unraid/webgui#2258
File: emhttp/plugins/dynamix/DashStats.page:0-0
Timestamp: 2025-06-21T00:10:40.789Z
Learning: In the Unraid webgui codebase (emhttp/plugins/dynamix), replacing `<i>` elements with `<button>` elements for accessibility would require extensive CSS refactoring due to legacy CSS having direct button styles that would conflict with icon-based toggles.
Learnt from: SimonFair
PR: unraid/webgui#1992
File: emhttp/plugins/dynamix/include/CPUset.php:0-0
Timestamp: 2025-02-01T15:12:16.914Z
Learning: In the unRAID WebGUI, button text should be wrapped in _() for translation support and htmlspecialchars() for security, with a preference for using ternary operators for simple conditional text assignments.
Learnt from: zackspear
PR: unraid/webgui#2211
File: emhttp/plugins/dynamix/Eth0.page:531-531
Timestamp: 2025-05-28T00:15:15.116Z
Learning: The Unraid webGUI is migrating from custom CSS classes to Tailwind CSS. The `hidden` class should be preferred over `hide` class as it matches Tailwind CSS conventions. This migration is being done incrementally as part of future-proofing the codebase.
Learnt from: Squidly271
PR: unraid/webgui#0
File: :0-0
Timestamp: 2025-05-31T05:10:13.120Z
Learning: Squidly271 prefers not to receive CodeRabbit reviews or feedback while PRs are in draft status. Only provide reviews after PRs are moved out of draft.
📚 Learning: in the unraid webgui docker manager (emhttp/plugins/dynamix.docker.manager/include/helpers.php), the...
Learnt from: Squidly271
PR: unraid/webgui#2293
File: emhttp/plugins/dynamix.docker.manager/include/Helpers.php:302-304
Timestamp: 2025-07-11T17:24:33.977Z
Learning: In the Unraid WebGUI Docker manager (emhttp/plugins/dynamix.docker.manager/include/Helpers.php), the xmlSecurity() function call is intentionally commented out to allow users to include < and > characters in their Docker template variables on their own servers. Default templates still explicitly disallow tags, but users can customize templates as needed in their self-hosted environment.

Applied to files:

  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: the file `emhttp/plugins/dynamix.my.servers/include/activation-code-extractor.php` is synced from a ...
Learnt from: zackspear
PR: unraid/webgui#2099
File: emhttp/plugins/dynamix.my.servers/include/activation-code-extractor.php:58-74
Timestamp: 2025-03-27T22:04:00.594Z
Learning: The file `emhttp/plugins/dynamix.my.servers/include/activation-code-extractor.php` is synced from a different repository, and modifications should not be suggested in this repository's context. Changes should be proposed in the source repository instead.

Applied to files:

  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: in the unraid webgui codebase (emhttp/plugins/dynamix/include/templates.php), there are known duplic...
Learnt from: zackspear
PR: unraid/webgui#2230
File: emhttp/plugins/dynamix/include/Templates.php:63-74
Timestamp: 2025-06-03T21:27:15.912Z
Learning: In the Unraid WebGUI codebase (emhttp/plugins/dynamix/include/Templates.php), there are known duplicate ID issues in checkbox templates across multiple template instances that the maintainers are aware of but have chosen not to address due to the effort required for legacy code improvements.

Applied to files:

  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: in the unraid webgui, button text should be wrapped in _() for translation support and htmlspecialch...
Learnt from: SimonFair
PR: unraid/webgui#1992
File: emhttp/plugins/dynamix/include/CPUset.php:0-0
Timestamp: 2025-02-01T15:12:16.914Z
Learning: In the unRAID WebGUI, button text should be wrapped in _() for translation support and htmlspecialchars() for security, with a preference for using ternary operators for simple conditional text assignments.

Applied to files:

  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: in the unraid webgui codebase (emhttp/plugins/dynamix), replacing `` elements with `` ele...
Learnt from: zackspear
PR: unraid/webgui#2258
File: emhttp/plugins/dynamix/DashStats.page:0-0
Timestamp: 2025-06-21T00:10:40.789Z
Learning: In the Unraid webgui codebase (emhttp/plugins/dynamix), replacing `<i>` elements with `<button>` elements for accessibility would require extensive CSS refactoring due to legacy CSS having direct button styles that would conflict with icon-based toggles.

Applied to files:

  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: the file emhttp/plugins/dynamix.my.servers/include/web-components-extractor.php is synced from anoth...
Learnt from: zackspear
PR: unraid/webgui#2099
File: emhttp/plugins/dynamix.my.servers/include/web-components-extractor.php:13-19
Timestamp: 2025-03-27T22:04:34.550Z
Learning: The file emhttp/plugins/dynamix.my.servers/include/web-components-extractor.php is synced from another repository and should not be modified directly in the webgui repository.

Applied to files:

  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php

@ljm42 ljm42 added the 7.2 label Aug 6, 2025
@limetech limetech merged commit f1ffaf2 into unraid:master Aug 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants