Skip to content

refactor(content): remove generic tool and home padding - #972

Open
trac3r00 wants to merge 2 commits into
release/product-value-20260912-02from
release/product-value-20260912-03
Open

trac3r00 wants to merge 2 commits into
release/product-value-20260912-02from
release/product-value-20260912-03

Conversation

@trac3r00

@trac3r00 trac3r00 commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

refactor(content): remove generic tool and home padding. This is logical change 3/11 in the dependency-ordered product-audit release stack.

Refs #969

What changed

  • refactor(content): remove generic tool and home padding
  • Exact source commit: 11badf2276ae92720651992bbef49a1a2006a087; validated tree: 96df8aa5399002623dad6f20c72593f78c491fc7.
  • Depends on the preceding release-stack PR. Retarget to main only after its dependency is merged and deployed.

Why

Keep tools and useful references prominent instead of repeating generic educational padding.

Verification

  • bun run build passed on this exact candidate tree.
  • npm test -- --maxWorkers=2 passed on this exact candidate tree.
  • Affected behavior manually exercised as described below.
  • Latest GitHub Build, Unit Tests (Vitest), and E2E Tests (Playwright) must all pass before merge.
Tests  711 passed (711)
CANDIDATE_BUILD_UNIT_GREEN
Committed tree equals validated tree: 96df8aa5399002623dad6f20c72593f78c491fc7

48 registered routes returned 200 without removed educational sections; home search/results/empty/clear/query restoration passed.

Final combined tree additionally passed 801 unit tests and all 293 Playwright tests with retries disabled, plus all 48 primary tool workflows at desktop and mobile. The exploratory Color Converter exact-HEX boundary remains a documented pre-existing defect; its runtime is unchanged by this stack.

Risk & rollback

  • Risk: Dependent commits require earlier stack changes; merge in order.
  • Rollback: revert this PR through a new PR; do not revert dependencies beneath already-merged dependents.
  • Release: require an approving review and latest-SHA CI. Respect the 15-minute soak between deploy-affecting merges and verify the production deployment before continuing.

Summary by cubic

Removes the generic educational sections (About / How to Use / Pro Tips) from 30+ tool pages and the editorial and flagship blurb blocks from the home page. Tool pages now render only the tool header, controls, related links, and reference content such as cheatsheets; the home page shows the catalog without padding below it. Refs #969.

Refactors

  • Deletes createEducationalSection() and createVisibleArticle() from src/utils/content-ui.js.
  • Removes the corresponding i18n strings from all 10 locale files.
  • Ad slots on tool pages now sit below the tool with no prose block above them.
  • Home search and empty/clear/query-restoration behavior is unchanged.
  • Moves the Related Tools grid on six routes back inside its width wrapper so it no longer runs edge to edge with a blank 48px gap, and drops oauth-debugger's empty mt-8 div.

Rollout

  • This is change 3/11 in a dependency-ordered release stack; merge in order, after the preceding PR is deployed.
  • Revert with a new PR; do not revert dependencies beneath already-merged dependents.
  • Requires an approving review, latest-SHA CI (build, unit, E2E), and the 15-minute soak between deploy-affecting merges.

Written for commit c529bfa. Summary will update on new commits.

Review in cubic

Keep tool controls, related links and useful reference sections; remove unreachable educational and homepage catalog padding together.

Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>

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

2 issues found across 47 files

Confidence score: 3/5

  • src/ui/home.js removes the homepage’s only ad unit along with the editorial block, which could reduce homepage ad inventory beyond the PR’s stated scope — preserve the ad slot if its removal is not intended.
  • src/routes/css-gradient-generator.js leaves an empty wrapper with pb-12, creating an unnecessary ~48px gap below the main content — remove the empty wrapper or its padding.

Not reviewed (too large): src/i18n/fr.js (~362 lines), src/i18n/ja.js (~362 lines), src/i18n/vi.js (~362 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/routes/css-gradient-generator.js">

<violation number="1" location="src/routes/css-gradient-generator.js:185">
P2: Removing the educational content left an empty `<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-12">...</div>` wrapper behind. With no content, its `pb-12` padding still renders a ~48px blank gap below the main panel, which contradicts the PR's goal of removing the padding. Delete the whole wrapper div (both the opening line and the added `</div>`), matching refactored routes like cidr-calculator.js that place createRelatedToolsSection directly.</violation>
</file>

<file name="src/ui/home.js">

<violation number="1" location="src/ui/home.js:6">
P2: This diff removes more than the editorial padding: it also deletes the homepage's only ad unit, `getAdSlotHTML("home", ...)`, which was inside the removed `home-below-catalog` block. The PR description scopes this change to "removed educational sections" and doesn't mention dropping the ad unit, so if that wasn't intentional it's a silent monetization regression on the site's highest-traffic page. The ad machinery still treats the home path as ad-enabled: `pageAllowsAds("/")` and `pageAllowsAdScript("/")` return true, `createPageTemplate` still emits the AdSense head script via `getAdSenseScript(pagePath)`, and `slotKeyForPath("/")`/`ALLOW_SLOT_KEYS` still map "home" to an active slot (src/utils/ads.js lines 9, 65-70, 202). The result is a homepage that loads adsbygoogle.js but has no `ins.adsbygoogle` unit to fill, and a dead "home" slot key in config. Confirm the ad removal was intended, or restore the unit; if removing it is deliberate, call it out in the PR description and consider also dropping the now-dead "home" slot handling.</violation>
</file>

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread src/routes/code-minifier.js Outdated
Comment thread src/routes/css-gradient-generator.js Outdated
currentLang,
)}
</div>
</div>

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: Removing the educational content left an empty <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-12">...</div> wrapper behind. With no content, its pb-12 padding still renders a ~48px blank gap below the main panel, which contradicts the PR's goal of removing the padding. Delete the whole wrapper div (both the opening line and the added </div>), matching refactored routes like cidr-calculator.js that place createRelatedToolsSection directly.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/routes/css-gradient-generator.js, line 185:

<comment>Removing the educational content left an empty `<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-12">...</div>` wrapper behind. With no content, its `pb-12` padding still renders a ~48px blank gap below the main panel, which contradicts the PR's goal of removing the padding. Delete the whole wrapper div (both the opening line and the added `</div>`), matching refactored routes like cidr-calculator.js that place createRelatedToolsSection directly.</comment>

<file context>
@@ -183,33 +182,7 @@ function renderCSSGradientPage(lang = DEFAULT_LANGUAGE) {
-        currentLang,
-      )}
-    </div>
+      </div>
     ${createRelatedToolsSection(relatedToolsData)}
 
</file context>

Comment thread src/ui/home.js

import { respondHTML } from "../utils/respond.js";
import { createPageTemplate, getAdSlotHTML, t } from "../utils/common-ui.js";
import { createPageTemplate, t } from "../utils/common-ui.js";

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: This diff removes more than the editorial padding: it also deletes the homepage's only ad unit, getAdSlotHTML("home", ...), which was inside the removed home-below-catalog block. The PR description scopes this change to "removed educational sections" and doesn't mention dropping the ad unit, so if that wasn't intentional it's a silent monetization regression on the site's highest-traffic page. The ad machinery still treats the home path as ad-enabled: pageAllowsAds("/") and pageAllowsAdScript("/") return true, createPageTemplate still emits the AdSense head script via getAdSenseScript(pagePath), and slotKeyForPath("/")/ALLOW_SLOT_KEYS still map "home" to an active slot (src/utils/ads.js lines 9, 65-70, 202). The result is a homepage that loads adsbygoogle.js but has no ins.adsbygoogle unit to fill, and a dead "home" slot key in config. Confirm the ad removal was intended, or restore the unit; if removing it is deliberate, call it out in the PR description and consider also dropping the now-dead "home" slot handling.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/ui/home.js, line 6:

<comment>This diff removes more than the editorial padding: it also deletes the homepage's only ad unit, `getAdSlotHTML("home", ...)`, which was inside the removed `home-below-catalog` block. The PR description scopes this change to "removed educational sections" and doesn't mention dropping the ad unit, so if that wasn't intentional it's a silent monetization regression on the site's highest-traffic page. The ad machinery still treats the home path as ad-enabled: `pageAllowsAds("/")` and `pageAllowsAdScript("/")` return true, `createPageTemplate` still emits the AdSense head script via `getAdSenseScript(pagePath)`, and `slotKeyForPath("/")`/`ALLOW_SLOT_KEYS` still map "home" to an active slot (src/utils/ads.js lines 9, 65-70, 202). The result is a homepage that loads adsbygoogle.js but has no `ins.adsbygoogle` unit to fill, and a dead "home" slot key in config. Confirm the ad removal was intended, or restore the unit; if removing it is deliberate, call it out in the PR description and consider also dropping the now-dead "home" slot handling.</comment>

<file context>
@@ -3,7 +3,7 @@
 
 import { respondHTML } from "../utils/respond.js";
-import { createPageTemplate, getAdSlotHTML, t } from "../utils/common-ui.js";
+import { createPageTemplate, t } from "../utils/common-ui.js";
 import { getToolsForEnvironment, CATEGORIES } from "../utils/tool-registry.js";
 import {
</file context>

Comment thread src/routes/image-converter.js Outdated
Comment thread src/routes/oauth-debugger.js Outdated
Comment thread src/routes/unit-converter.js Outdated
Comment thread src/routes/mock-data-generator.js Outdated
Comment thread src/routes/color-converter.js Outdated
Comment thread src/utils/ads.test.js
Six routes kept an empty max-w-7xl pb-12 wrapper while rendering Related
Tools outside any width container, so the grid ran edge to edge (0-1440px
desktop, 0-390px mobile) with an extra blank 48px gap. Move the section
into the wrapper, matching case-converter and the other routes, and drop
oauth-debugger's empty mt-8 div. The all-tools content test now asserts a
200 HTML response with the page shell, <main>, and exactly one <h1> before
its negative checks, so an error or empty page cannot pass.

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

0 issues found across 8 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would not auto-approve. Auto-approval blocked by 2 unresolved issues from previous reviews.

Re-trigger cubic

trac3r00 added a commit that referenced this pull request Sep 29, 2026
- run the content-locale generator --check in the unit suite so stale output fails CI
- keep ?lang on FAQ answer links; drop unreachable localized FAQ_CONTENT arrays
- security keeps its detailed, localized response text; contact keeps the generic one
- drop the About count fallback that duplicated data-public-tool-count
- keep the historical changelog entry free of the live tool count
- remove / from manual-unit inventory to match #972 and the Terms copy
- render-level test binds legal ad-scope markup to getAdPolicySnapshot()
- docs: replace the untracked harness reference with a reproducible step
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