Skip to content

guides: lead the index with the Agent Skills card - #258

Merged
leoncheng57 merged 1 commit into
mainfrom
guides/agent-skills-top-255
Aug 21, 2026
Merged

guides: lead the index with the Agent Skills card#258
leoncheng57 merged 1 commit into
mainfrom
guides/agent-skills-top-255

Conversation

@leoncheng57

Copy link
Copy Markdown
Owner

Closes #255

What

Moves the inlined Agent Skills <article> in GuidesIndexRoute.tsx from the bottom of the guide list to the top, so it is the first card on /guides.

PR #241 put it last on the reasoning that the one off-site entry belongs below the first-party pages. That's now overridden — it's the newest work and should be the most prominent.

The comment

The card now sits above {guides.map(...)}, i.e. above content sorted by updatedAt descending. That reads like a sorting bug at a glance, so the block carries a comment saying the placement is deliberate and pointing at both issues. Without it someone eventually "fixes" it back.

Tests

guides-route.test.tsx had no ordering assertions, so a silent re-sort would not have been caught. Added one:

  • leads the index with the agent skills card, ahead of the date-sorted guides — collects the sibling <article> cards and asserts the Agent Skills card is index 0 and the manager/worker markdown guide lands after it. Verified it is not vacuous: flipping the expectation to last-position makes it fail.

No existing test needed changing. Both GitHub ↗ lookups were already scoped to their own <article> (the OpenCode Remote Control one since #241), so the duplicate match stays resolved after the reorder. The getAllByRole('link', { name: /read guide/ })[0] query is also unaffected — the Agent Skills CTA is browse skills ↗, not read guide.

Verification

Node 26.3.0.

baseline (origin/main) this branch
npm run test:run 35 failed / 403 passed (438) 35 failed / 404 passed (439)
failing files weather-routes.test.tsx only weather-routes.test.tsx only

Identical failure set; the delta is the one new passing test. Those 35 are the known pre-existing Node 26 breakage — Node emits its own localStorage that shadows jsdom's, so window.localStorage.clear() in that file's beforeEach throws. Reproduced on clean origin/main first and left alone.

  • npm run lint — clean
  • npm run build — succeeds

Build output is not committed, matching main (docs/ was last touched in #204, not per-change).

Visual

Served the production build and read back the rendered card order on /guides:

0. $ Agent Skills
1. $ Building a Custom Coding-Agent IDE with OpenHands
2. $ Running Parallel Coding Agents with a Manager and Workers
3. $ cmux personal config
4. $ opencode personal config
5. $ OpenCode Remote Control BETA

The catalogue is the newest work, so it takes the most prominent slot
instead of the last one #241 gave it. That puts an inlined article above
the getAllGuides() cards, which are sorted by updatedAt descending, so
the placement is called out in a comment: it reads like a sorting bug
otherwise and would get "fixed" back.

A test pins the new order, since nothing else would catch a silent
re-sort. The existing scoped "GitHub ↗" lookups still resolve, as both
already narrow to their own <article>.

Closes #255
@leoncheng57
leoncheng57 merged commit c263e2c into main Aug 21, 2026
2 checks 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.

guides: move the Agent Skills card to the top

1 participant