Skip to content

Update footer script for service status - #1070

Open
PythonSmall-Q wants to merge 1 commit into
devfrom
statuspage
Open

PythonSmall-Q wants to merge 1 commit into
devfrom
statuspage

Conversation

@PythonSmall-Q

@PythonSmall-Q PythonSmall-Q commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

What does this PR aim to accomplish?:

How does this PR accomplish the above?:

Does this PR need a documentation update?:


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributor's guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against. (dev for XMOJ-Script, master for everything else).
  2. I have commented on my proposed changes within the code.
  3. I have tested my changes.
  4. I am willing to help maintain this change if there are issues with it later.
  5. It is compatible with the GNU General Public License v3.0
  6. I have squashed any insignificant commits. (git rebase)
  7. I have checked that another pull request for this purpose does not exist.
  8. I have considered and confirmed that this submission will be valuable to others.
  9. I accept that this submission may not be used, and the pull request can be closed at the will of the maintainer.
  10. I give this submission freely and claim no ownership to its content.
  11. I have verified that my changes work correctly in all four UI combinations:
    • the script's monochrome UI on XMOJ's new UI (/web pages)
    • the script's monochrome UI on XMOJ's old/classic pages
    • the script's classic UI on XMOJ's new UI (/web pages)
    • the script's classic UI on XMOJ's old/classic pages

  • I have read the above and my PR is ready for review. Check this box to confirm

Summary by cubic

Updates the footer status indicator to use the XMOJ Script status service and adds a link to its status page.

  • Hides the indicator when all services are operational and checks for updates every five minutes.

Written for commit 4a0ee2a. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by Sourcery

Update the footer service-status integration to point users to the current status service.

New Features:

  • Add a footer link to the XMOJ-Script service status page.

Bug Fixes:

  • Update the embedded service-status widget to use the current status domain and configuration.

Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying xmoj-script-dev-channel with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4a0ee2a
Status: ✅  Deploy successful!
Preview URL: https://f9579846.xmoj-script-dev-channel.pages.dev
Branch Preview URL: https://statuspage.xmoj-script-dev-channel.pages.dev

View logs

@sourcery-ai

sourcery-ai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the site footer to link to the new service-status dashboard and replaces the legacy embedded status widget with the new provider’s configurable widget, including five-minute polling and reduced display of operational messages.

File-Level Changes

Change Details Files
Adds a footer link to the hosted service-status page.
  • Adds a localized “服务状态” link opening the status site in a new tab with safe opener handling.
index.html
Migrates the embedded status widget to the new status service and configures its display behavior.
  • Replaces the legacy Statuspage script URL with the new embed script.
  • Configures all-service monitoring, top-right placement, hiding of operational notices, and a five-minute polling interval.
index.html

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@hendragon-bot hendragon-bot Bot added the website This issue or pull request is related to website related files label Oct 17, 2026
@PythonSmall-Q
PythonSmall-Q requested review from boomzero and a balanced review from Copilot October 17, 2026 04:49

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="index.html">

<violation number="1" location="index.html:323">
P3: The new "服务状态" footer link exists only on the homepage. The other pages' footers (404.html, terms.html, child-protection.html, privacy.html) use the same `footer-links` list and the comment says they should stay in sync. Add the link to those footers too, or drop the comment's consistency claim.</violation>

<violation number="2" location="index.html:338">
P2: The homepage now loads the status widget from `status.xmoj-script.uk` instead of Statuspage. The provider table in `privacy.html` still lists "Statuspage(Atlassian)" as the service that shows status on the homepage. Update that row (or add the new host) so the disclosure matches the actual third-party requests.</violation>
</file>

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread index.html

<script
defer
src="https://status.xmoj-script.uk/embed.js"

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.

P2: The homepage now loads the status widget from status.xmoj-script.uk instead of Statuspage. The provider table in privacy.html still lists "Statuspage(Atlassian)" as the service that shows status on the homepage. Update that row (or add the new host) so the disclosure matches the actual third-party requests.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At index.html, line 338:

<comment>The homepage now loads the status widget from `status.xmoj-script.uk` instead of Statuspage. The provider table in `privacy.html` still lists "Statuspage(Atlassian)" as the service that shows status on the homepage. Update that row (or add the new host) so the disclosure matches the actual third-party requests.</comment>

<file context>
@@ -331,7 +332,15 @@ <h3 class="h5">赞助</h3>
+
+    <script
+        defer
+        src="https://status.xmoj-script.uk/embed.js"
+        data-service="all"
+        data-position="top-right"
</file context>

Comment thread index.html
<div class="container">
<ul class="footer-links">
<li><a href="https://docs.xmoj-script.uk" target="_blank" rel="noopener noreferrer">文档</a></li>
<li><a href="https://status.xmoj-script.uk/" target="_blank" rel="noopener noreferrer">服务状态</a></li>

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.

P3: The new "服务状态" footer link exists only on the homepage. The other pages' footers (404.html, terms.html, child-protection.html, privacy.html) use the same footer-links list and the comment says they should stay in sync. Add the link to those footers too, or drop the comment's consistency claim.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At index.html, line 323:

<comment>The new "服务状态" footer link exists only on the homepage. The other pages' footers (404.html, terms.html, child-protection.html, privacy.html) use the same `footer-links` list and the comment says they should stay in sync. Add the link to those footers too, or drop the comment's consistency claim.</comment>

<file context>
@@ -320,6 +320,7 @@ <h3 class="h5">赞助</h3>
         <div class="container">
             <ul class="footer-links">
                 <li><a href="https://docs.xmoj-script.uk" target="_blank" rel="noopener noreferrer">文档</a></li>
+                <li><a href="https://status.xmoj-script.uk/" target="_blank" rel="noopener noreferrer">服务状态</a></li>
                 <li><a href="messages.html">短消息在线看</a></li>
                 <li><a href="privacy.html">隐私说明</a></li>
</file context>

@sourcery-ai sourcery-ai 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.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="index.html" line_range="338" />
<code_context>
+
+    <script
+        defer
+        src="https://status.xmoj-script.uk/embed.js"
+        data-service="all"
+        data-position="top-right"
</code_context>
<issue_to_address>
**Privacy notice names old provider**

When `status.xmoj-script.uk` is operated by a provider other than Atlassian, `privacy.html` still identifies “Statuspage(Atlassian)” as the service displaying status and lists its data handling, so the notice names the wrong processor and misleads users about who receives their requests.

Update the privacy notice to identify the actual status-service provider and its data handling.
</issue_to_address>

### Comment 2
<location path="index.html" line_range="323" />
<code_context>
         <div class="container">
             <ul class="footer-links">
                 <li><a href="https://docs.xmoj-script.uk" target="_blank" rel="noopener noreferrer">文档</a></li>
+                <li><a href="https://status.xmoj-script.uk/" target="_blank" rel="noopener noreferrer">服务状态</a></li>
                 <li><a href="messages.html">短消息在线看</a></li>
                 <li><a href="privacy.html">隐私说明</a></li>
</code_context>
<issue_to_address>
**Status link missing elsewhere**

When a visitor opens a page other than `index.html`, `404.html`, `privacy.html`, `terms.html`, and `child-protection.html` retain footers without the status link, so visitors on those pages cannot reach the status page from the footer.

Add the status link to the footer on each of those pages as well.
</issue_to_address>

Sourcery assessment

Approval pending. 2 findings to address first.

Blocking findings: index.html:338, index.html:323


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread index.html

<script
defer
src="https://status.xmoj-script.uk/embed.js"

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.

🟡 Medium · Privacy notice names old provider

When status.xmoj-script.uk is operated by a provider other than Atlassian, privacy.html still identifies “Statuspage(Atlassian)” as the service displaying status and lists its data handling, so the notice names the wrong processor and misleads users about who receives their requests.

Update the privacy notice to identify the actual status-service provider and its data handling.

Prompt for AI agents
In `index.html` at line 338:

**Privacy notice names old provider**

When `status.xmoj-script.uk` is operated by a provider other than Atlassian, `privacy.html` still identifies “Statuspage(Atlassian)” as the service displaying status and lists its data handling, so the notice names the wrong processor and misleads users about who receives their requests.

Update the privacy notice to identify the actual status-service provider and its data handling.

Comment thread index.html
<div class="container">
<ul class="footer-links">
<li><a href="https://docs.xmoj-script.uk" target="_blank" rel="noopener noreferrer">文档</a></li>
<li><a href="https://status.xmoj-script.uk/" target="_blank" rel="noopener noreferrer">服务状态</a></li>

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.

🟡 Medium · Status link missing elsewhere

When a visitor opens a page other than index.html, 404.html, privacy.html, terms.html, and child-protection.html retain footers without the status link, so visitors on those pages cannot reach the status page from the footer.

Add the status link to the footer on each of those pages as well.

Prompt for AI agents
In `index.html` at line 323:

**Status link missing elsewhere**

When a visitor opens a page other than `index.html`, `404.html`, `privacy.html`, `terms.html`, and `child-protection.html` retain footers without the status link, so visitors on those pages cannot reach the status page from the footer.

Add the status link to the footer on each of those pages as well.

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@boomzero

boomzero commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

主站如果炸了这个statuspage肯定也会炸

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S website This issue or pull request is related to website related files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants