Skip to content

site: stop page-load redraw with hero realign + skeleton placeholders - #464

Merged
max-sixty merged 1 commit into
mainfrom
refresh
May 14, 2026
Merged

max-sixty merged 1 commit into
mainfrom
refresh

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

Two sources of layout shift on every page load.

  1. Hero re-center. .hero used align-items: center, so when the runtime-fetched #now-tending indicator appeared at the bottom of the left column, the row re-centered and the heading visibly shifted upward. Switched to align-items: start.

  2. Sections popping in. #now-tending, #stats, and #recent-activity flipped from the HTML hidden attribute (display: none) to visible once each fetch resolved, pushing the page down each time. Replaced the hidden attribute with a tri-state data-state attribute driven by liveData:

    • loading — laid out, opacity: 0
    • loaded — fades to opacity: 1
    • hidden — collapsed via display: none (preserves today's worker-outage behaviour)

To reserve the right amount of space during loading without hardcoding heights in CSS, each component ships skeleton placeholders of the same DOM shape as its real content (4 stat cells, 12 activity rows, a dot + nbsp for now-tending). The renderers call replaceChildren() before appending real data. Stats now always renders the "this week" line (nbsp when zero) so cell heights stay constant whether or not there's week-over-week activity.

Test plan

  • Skeleton and loaded heights match within sub-pixel rounding (verified locally: now-tending 19.96px, stats 83.36px, activity-rows 557.4px both before and after fetch)
  • CLS = 0 on fresh load (verified locally via PerformanceObserver)
  • Worker-outage fallback still collapses each section (data-state="hidden" → display: none)
  • Visual smoke test on production deploy

…ders

Two sources of layout shift on every page load. The first was the hero —
`align-items: center` re-centered the row when the runtime-fetched
`#now-tending` indicator appeared at the bottom of the left column,
shifting the heading. Switched to `align-items: start`.

The other three (#now-tending, #stats, #recent-activity) flipped from
the HTML `hidden` attribute (display:none) to visible once their fetch
resolved, popping into the layout. Replaced with a tri-state
`data-state` attribute driven by `liveData`: `loading` keeps the section
laid out but at opacity 0; `loaded` fades to 1; `hidden` collapses via
`display: none` (preserves today's worker-outage behaviour).

To reserve the right amount of space during `loading` without
hardcoding heights in CSS, each component ships skeleton placeholders
of the same DOM shape as its real content — 4 stat cells, 12 activity
rows, a dot + nbsp for now-tending. The renderers call
`replaceChildren()` before appending real data. Stat strip now always
renders the "this week" line (nbsp when zero) so cell heights stay
constant. Verified: skeleton and loaded heights match within
sub-pixel rounding; CLS = 0.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 3f0d274 into main May 14, 2026
6 checks passed
@max-sixty
max-sixty deleted the refresh branch May 14, 2026 00:28
@max-sixty max-sixty mentioned this pull request May 15, 2026
2 of 6 tasks
max-sixty added a commit that referenced this pull request May 15, 2026
## Summary

Release 0.0.19. Headline change: **Codex harness support alongside
Claude** (#480).

- New `codex/action.yaml` composite action — invokable as
`max-sixty/tend/codex@v1`.
- `harness: claude | codex` field in `.config/tend.yaml` (default
`claude`); the generator picks the matching action ref and secret names
per harness.
- `shared/system-prompt.md` consumed by both actions.
- Codex plugin manifest at
`plugins/tend-ci-runner/.codex-plugin/plugin.json` and marketplace at
`.agents/plugins/marketplace.json`.

Tend's own config stays on `harness: claude` for now — flipping to Codex
is a separate follow-up PR after this release publishes.

Site polish + minor fixes round out the rest (#456, #462–#464,
#468–#472, #475, #476, #478, #481, #457, #459, #466, #482).

## Test plan

- [x] `wt test` passes
- [x] `pre-commit run --all-files` passes
- [ ] CI green on this PR
- [ ] After merge: `uvx [email protected] --help` resolves once PyPI release
workflow completes
- [ ] v1 branch auto-updated by `update-action-branch.yaml`
- [ ] Follow-up PR regenerates tend's own workflows with `uvx
tend@latest init`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
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.

2 participants