Skip to content

chore: delete examples/patterns (folded into docs/recipes/patterns)#99

Merged
adnaan merged 2 commits into
mainfrom
delete-patterns
May 10, 2026
Merged

chore: delete examples/patterns (folded into docs/recipes/patterns)#99
adnaan merged 2 commits into
mainfrom
delete-patterns

Conversation

@adnaan
Copy link
Copy Markdown
Contributor

@adnaan adnaan commented May 10, 2026

Summary

Final piece of the patterns migration. The patterns app already lives in livetemplate/docs — public catalog at https://livetemplate.fly.dev/patterns/* is served by the docs binary's in-process recipes server since livetemplate/docs#11 (May 10).

This PR deletes the now-unused source from this repo.

Coverage continuity

Cross-repo test-examples coverage was preserved by livetemplate/livetemplate#400 (just merged) which adds a parallel test-docs job that runs the relocated patterns suite (now at docs/e2e/patterns/) against core livetemplate changes. No coverage gap.

Diff

  • Delete patterns/ (62 files, ~8.5k lines): 22 .go source files, 30 templates, Dockerfile, fly.toml, .dockerignore, README.md, plus the patterns/ subtree.
  • Edit test-all.sh line 44: remove "patterns" from WORKING_EXAMPLES so the cross-repo test-examples job auto-skips it without erroring on missing dir.
  • Update README.md line 5: now describes the /patterns catalog as served from the docs repo's content/recipes/patterns/_app/, not this repo.

Test plan

  • WORKING_EXAMPLES directory existence sanity check — all 12 remaining dirs exist, patterns/ confirmed gone
  • grep -rn "patterns/\|examples/patterns" — no stale refs in source/scripts/configs (only dialog-patterns/ remains, which is a separate example)
  • After merge: cross-repo test-examples job in livetemplate runs without erroring on missing patterns dir
  • After merge: livetemplate's test-docs job (added in ci: add test-docs cross-repo job for patterns e2e coverage livetemplate#400) keeps patterns coverage alive

Manual ops (not in this PR)

🤖 Generated with Claude Code

The patterns app moved to livetemplate/docs at content/recipes/patterns/_app/
in livetemplate/docs#10 (B1, May 9). The B2 routing flip
(livetemplate/docs#11) repointed the public catalog at /patterns/* to
serve from the docs binary's in-process recipes server, and the e2e
suite was relocated to docs/e2e/patterns/.

After livetemplate/livetemplate#400 (just merged) added the test-docs
cross-repo job that runs the relocated patterns suite against core
livetemplate changes, the patterns app's "runs against core changes"
coverage is preserved with no gap.

This PR completes the migration:
- Delete examples/patterns/ entirely (62 files, ~8.5k lines: 22 .go
  source files, 30 templates, Dockerfile, fly.toml, .dockerignore,
  README, plus the patterns/ subtree).
- Remove "patterns" from test-all.sh's WORKING_EXAMPLES so the
  test-examples cross-repo job (in livetemplate/livetemplate) auto-
  skips it without erroring.
- Update README.md to reflect that the /patterns docs catalog is now
  served from livetemplate/docs's recipes/patterns/_app/ package
  (not from this repo).

Manual ops (not in this PR):
- Decommission the lt-patterns.fly.dev Fly app — has been receiving
  zero production traffic since livetemplate/docs#11 deployed (May 10
  ~04:30 UTC).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 10, 2026 05:01
@claude
Copy link
Copy Markdown

claude Bot commented May 10, 2026

Code Review — PR #99: Delete patterns/ (migration cleanup)

Overview

This is a well-scoped cleanup PR removing the patterns/ directory (~8.5k lines, 62 files) after migrating it to livetemplate/docs. The actual code change is just three edits: removing \"patterns\" from WORKING_EXAMPLES in test-all.sh and one sentence update to README.md. Everything else is a mass deletion, which is the right outcome.


What's Good

  • Clean deletion — no leftover references to patterns/ in source, scripts, or config (per the grep check in the PR description).
  • test-all.sh is correct\"patterns\" is removed from WORKING_EXAMPLES. The array now has exactly 12 entries matching the 12 remaining example directories. The sanity check in the test plan is verified.
  • Coverage continuity is addressed — the PR correctly identifies that livetemplate/livetemplate#400 (adding test-docs CI job) must land first. The description says it's merged, which is the right precondition to document.
  • PR description is thorough — cross-repo context, diff breakdown, and manual ops are all called out clearly.

Issues / Suggestions

1. README link is vague — consider adding a direct pointer

The updated README line says the patterns catalog is served from content/recipes/patterns/_app/ in the docs repo, but doesn't link to it. A contributor looking for the source after this PR merges will have to hunt. Suggest adding the direct GitHub URL:

The `/patterns` catalog is served from the docs repo's [`content/recipes/patterns/_app/`](https://github.com/livetemplate/docs/tree/main/content/recipes/patterns/_app/) package.

2. Fly app decommission is untracked

The PR notes:

Decommission lt-patterns.fly.dev Fly app (zero production traffic since livetemplate/docs#11 deployed ~04:30 UTC May 10).

This is listed as a manual op outside the PR, but there's no mention of where it's tracked (issue, Linear ticket, etc.). Once this PR merges, the context disappears. Worth opening a follow-up issue or at least noting the tracking location in the PR description before merging.

3. Two post-merge checklist items are unverifiable pre-merge

The test plan has two unchecked items:

  • test-examples job skips patterns/ without erroring
  • test-docs job keeps patterns coverage alive

These are inherently post-merge CI verifications, which is fine — but it's worth confirming livetemplate/livetemplate#400 is actually merged (not just open) before this lands, since coverage gap is the main risk of this PR.


Risk Assessment

Low risk overall. This is a deletion of already-migrated code with no impact on the 12 remaining examples. The only real risk is if the test-docs coverage job isn't actually wired up yet — but the PR description says that's done. Verify CI passes after merge.


Summary

The change is correct and the PR description is exemplary. Two minor follow-ups worth addressing before merge:

  1. Add a direct link to the docs repo source in README.md (trivial, one-line fix).
  2. Confirm livetemplate/livetemplate#400 is merged and that the Fly app decommission is tracked somewhere.

Everything else looks good. Approve with minor suggestions.

🤖 Generated with Claude Code

Per Claude review on #99 — the README sentence pointing to the
docs catalog source named the path but didn't link it. Direct
URL keeps the trail navigable for contributors arriving here
post-deletion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@adnaan
Copy link
Copy Markdown
Contributor Author

adnaan commented May 10, 2026

On the two non-code review notes:

Confirming #400 is merged. livetemplate/livetemplate#400 merged at a65cc9def0adf10db75cf5d217981b436f4cce2a (just now). The new test-docs cross-repo job ran successfully against itself in that PR's CI before merge, so coverage is wired up before this PR lands.

Fly decommission tracking. Not opening a separate issue — it's a single one-shot manual op (fly scale count 0 -a lt-patterns then later fly apps destroy lt-patterns). I'll run it after watching lt-patterns.fly.dev logs for 24h post-#11 deploy to confirm zero production traffic, then again after a 7-day soak before destroy.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the patterns/ example application from this repo after it was migrated into the livetemplate/docs recipes app, and updates local docs/test tooling to stop referencing the deleted directory.

Changes:

  • Deleted the patterns/ application subtree (handlers, templates, tests, and deploy artifacts).
  • Removed patterns from WORKING_EXAMPLES in test-all.sh to prevent missing-directory failures.
  • Updated the top-level README to clarify /patterns is now served from the docs repo.

Reviewed changes

Copilot reviewed 61 out of 62 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test-all.sh Removes patterns from the working examples list so the test runner doesn’t fail on a missing directory.
README.md Updates documentation to point /patterns hosting to the docs repo app location.
patterns/templates/search/url-filters.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/search/active-search.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/realtime/server-push.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/realtime/reconnection.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/realtime/presence.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/realtime/multi-user-sync.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/realtime/live-preview.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/realtime/broadcasting.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/navigation/tabs.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/navigation/spa-navigation.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/navigation/modal-dialog.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/navigation/keyboard-shortcuts.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/navigation/confirm-dialog.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/loading/progress-bar.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/loading/lazy-loading.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/loading/async-operations.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/lists/value-select.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/lists/sortable.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/lists/large-table.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/lists/infinite-scroll.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/lists/delete-row.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/lists/click-to-load.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/layout.tmpl Deleted as part of removing the patterns/ app shared layout.
patterns/templates/index.tmpl Deleted as part of removing the patterns/ app index template.
patterns/templates/forms/reset-input.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/forms/preserve-inputs.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/forms/inline-validation.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/forms/file-upload.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/forms/edit-row.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/forms/click-to-edit.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/forms/bulk-update.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/feedback/loading-states.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/feedback/highlight.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/feedback/flash-messages.tmpl Deleted as part of removing the patterns/ app templates.
patterns/templates/feedback/animations.tmpl Deleted as part of removing the patterns/ app templates.
patterns/state_search.go Deleted as part of removing the patterns/ app state definitions.
patterns/state_realtime.go Deleted as part of removing the patterns/ app state definitions.
patterns/state_navigation.go Deleted as part of removing the patterns/ app state definitions.
patterns/state_loading.go Deleted as part of removing the patterns/ app state definitions.
patterns/state_lists.go Deleted as part of removing the patterns/ app state definitions.
patterns/state_forms.go Deleted as part of removing the patterns/ app state definitions.
patterns/state_feedback.go Deleted as part of removing the patterns/ app state definitions.
patterns/README.md Deleted as part of removing the patterns/ app documentation.
patterns/main.go Deleted as part of removing the patterns/ app server entrypoint and routing.
patterns/large_table_bench_test.go Deleted as part of removing the patterns/ app benchmarks.
patterns/handlers_search.go Deleted as part of removing the patterns/ app handlers.
patterns/handlers_realtime.go Deleted as part of removing the patterns/ app handlers.
patterns/handlers_navigation.go Deleted as part of removing the patterns/ app handlers.
patterns/handlers_loading.go Deleted as part of removing the patterns/ app handlers.
patterns/handlers_lists.go Deleted as part of removing the patterns/ app handlers.
patterns/handlers_forms.go Deleted as part of removing the patterns/ app handlers.
patterns/handlers_feedback.go Deleted as part of removing the patterns/ app handlers.
patterns/fly.toml Deleted as part of removing the patterns/ app deployment configuration.
patterns/Dockerfile Deleted as part of removing the patterns/ app container build/deploy setup.
patterns/data.go Deleted as part of removing the patterns/ app data/model helpers.
patterns/cross_handler_nav_test.go Deleted as part of removing the patterns/ app E2E navigation tests.
patterns/api_index.go Deleted as part of removing the patterns/ app JSON catalog endpoint.
patterns/api_index_test.go Deleted as part of removing the patterns/ app JSON catalog endpoint tests.
patterns/.dockerignore Deleted as part of removing the patterns/ app Docker build context config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@claude
Copy link
Copy Markdown

claude Bot commented May 10, 2026

Code Review — PR #99 (follow-up)

Summary

This is a clean, low-risk cleanup PR. The code changes are minimal: one line removed from test-all.sh and one sentence updated in README.md. The rest is a mass deletion of already-migrated code.

Assessment of Author Responses

Both concerns from the prior review have been resolved:

  1. README link — the updated README.md already includes a direct GitHub URL to content/recipes/patterns/_app/ in the docs repo. No further action needed.

  2. Fly app decommission — author confirmed the plan (watch logs for 24h → 7-day soak → destroy). This is a reasonable ops workflow; a separate issue is not necessary for a two-step manual op with a clear owner.

  3. ci: add test-docs cross-repo job for patterns e2e coverage livetemplate#400 — author confirmed it merged and that test-docs CI ran successfully against it. The coverage continuity precondition is satisfied.

Final Check

  • test-all.sh: "patterns" correctly removed from WORKING_EXAMPLES. The 12 remaining entries all correspond to real directories. ✓
  • README.md: new wording is accurate and includes the direct link. ✓
  • No stale references left in source/scripts/configs per the PR's grep check. ✓
  • No production impact: lt-patterns.fly.dev already had zero traffic before this PR. ✓

Verdict

Ready to merge. All concerns addressed. The PR is correct and the description is thorough. Coverage is maintained via the cross-repo test-docs job.

🤖 Generated with Claude Code

@adnaan adnaan merged commit 339611d into main May 10, 2026
10 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.

2 participants