Skip to content

πŸ› fix(stories): show trimmed-story notice when the popup is blocked - #256

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-255
Oct 25, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-255

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Summary

When a popup is blocked, the fallback link is shown but the trimmed-story notice is never displayed in #story-status. This fix ensures users see that their story was truncated to 1500 characters on the popup-blocked path as well.

Changes

  • Shared the trimmed-notice string to avoid duplication
  • Set the truncation notice on the popup-blocked path before returning
  • Added test cases for both truncated and non-truncated stories on the popup-blocked path
  • Regenerated CSP script-src hashes via update-csp-hashes.mjs

Closes #255

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 46c5549

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 25, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read stories/index.html at the PR head and ran the tree, not just the diff. Looks correct to me.

  • stories/index.html:511 sets status.textContent = trimmedNotice on the popup-blocked branch before the early return, which is exactly the gap #255 describes; the normal path (:517) now shares the same string, so the two notices cannot drift.
  • status is cleared at :500 on each submit, so a stale notice can't survive a second, non-truncated submission (the new "non-truncated" test at scripts/story-dialog.test.mjs asserts "").
  • The copy button (:525) still overwrites the notice with "Copied." β€” that's pre-existing behaviour and reasonable, since the trimmed story is already in the copied text.
  • node scripts/update-csp-hashes.mjs --check exits 0 at 46c5549, so the regenerated script-src hash matches the edited inline script; node --test scripts/*.test.mjs β†’ 740/740 pass.

No findings. Not approving (human signature), just confirming the read.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit f930ed0 into main Oct 25, 2026
6 of 7 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-255 branch October 25, 2026 00:59
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#25646c5549` sha256:91a96c53955375990a23260d295e39ad9cb649212ac5938f6b567b3fdba3b11a β€” download from the dashboard or `hivectl review evidence #256`.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] stories: popup-blocked fallback drops the 'story was trimmed to 1500 characters' notice

0 participants