Skip to content

hotfix: drop public visitor-tracker + speed up deploy#44

Merged
GhDj merged 2 commits into
mainfrom
hotfix/remove-public-visitor-tracker
Apr 29, 2026
Merged

hotfix: drop public visitor-tracker + speed up deploy#44
GhDj merged 2 commits into
mainfrom
hotfix/remove-public-visitor-tracker

Conversation

@GhDj
Copy link
Copy Markdown
Owner

@GhDj GhDj commented Apr 29, 2026

Two unrelated fixes bundled

1. Drop the public Visitor Tracker tool

The visitor-tracker dashboard is admin-only — reachable through the
package's own `/admin/visitor-tracker` route gated by Cloudflare Access
in production. It should not be listed as a public tool on the home
page or sitemap, and a `/tools/visitor-tracker` page exposing the
same stats publicly is exactly what we don't want.

Removed:

  • Home tools-grid entry
  • `/tools/visitor-tracker` route
  • Sitemap entry
  • `ToolController::visitorTracker()` method
  • `resources/views/tools/visitor-tracker.blade.php`

2. Skip vendor and asset rebuild when their lockfiles haven't changed

SFTP-uploading `vendor/` (hundreds of MB) on every deploy was
dominating deploy time, even when only a controller or view changed.

Now the workflow diffs against the previous release tag and only:

  • runs `composer install` + ships `vendor/` if `composer.json` or
    `composer.lock` changed
  • runs `npm ci` + `npm run build` if `package(-lock).json`,
    `vite.config.js`, or `resources/css|js/` changed

Source files always upload (they're cheap). The SFTP action has
`delete_remote_files: false`, so skipped uploads leave the existing
prod copies untouched. Vite content-hashes asset filenames, so old
`public/build/` files are harmless leftovers.

A new `workflow_dispatch` input `force_full` is available for the
override case (e.g. recovering from a partial deploy).

Test plan

  • Local PHPUnit suite green (299 passed)
  • After merge: trigger `workflow_dispatch` from `main`, expect
    composer/npm steps to be skipped (this PR doesn't touch
    `composer.lock` or `package-lock.json`); deploy should ship only
    the changed source files
  • Confirm `/tools/visitor-tracker` returns 404 in prod after deploy
  • Confirm home page tool grid no longer shows Visitor Tracker

GhDj added 2 commits April 29, 2026 10:29
The visitor-tracker dashboard is admin-only and should be reached via
the package's own /admin/visitor-tracker route (gated by Cloudflare
Access in production). It should not be listed as a public tool on
the home page or sitemap.

- Drop the Visitor Tracker entry from the home tools grid.
- Remove the /tools/visitor-tracker route, sitemap entry,
  visitorTracker() controller method, and the public-facing view.
Most deploys only touch app/, routes/, or views — yet every deploy
re-uploads the entire vendor/ tree (hundreds of MB, thousands of
files), which dominates SFTP time. Make the heavy steps conditional:

- Diff against the previous release tag to see what actually changed.
- Run composer install (and ship vendor/) only when composer.json or
  composer.lock changed.
- Run npm ci + vite build only when package(-lock).json, vite.config,
  or resources/css|js changed. Vite hashes filenames, so leftover
  public/build/ files on the server are harmless.
- Source files (app/, routes/, resources/views/, etc.) still upload
  every time — they're cheap.

The SFTP action has delete_remote_files: false, so skipped uploads
leave the existing prod copies untouched.

Add a workflow_dispatch input 'force_full' for the override case
(e.g. recovering from a partial deploy or a server-side vendor wipe).
@GhDj GhDj merged commit 223a557 into main Apr 29, 2026
@GhDj GhDj deleted the hotfix/remove-public-visitor-tracker branch April 29, 2026 09:31
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