Guides · Operations

Dead code audit and verified removal list

Use this page before you remove code from the public site. It traces every export, route, component, utility and stylesheet reference in pack app-permitdesk.site.1, states the evidence for each candidate, and names the one candidate that met every removal check in this pack. A candidate that could still be used by the signed-in app, by server routing or by a direct URL is not listed for removal.

How this audit was checked

Every file in pack app-permitdesk.site.1 was checked: public site js, public site css, each marketing page in public, each guide in public guides, public health html, public offline html, public status html, public request demo html, public app index html, and APPKIT.md for the app module pattern. A candidate was listed only where a stated search term returned no reference. Where the pack does not state a reference, this page writes Unknown and names the file that must be supplied before removal.

  • Scope is the site part only. Signed-in app views, app modules, the Worker entry point and server routing are not in this pack, so a candidate that those files could use stays Unknown on this page.
  • A removal candidate must meet all three checks: no reference in any site file, no export or route that another site file calls, and no use by a direct URL or server fallback stated in the pack. A candidate that fails any check is listed as not dead, not as a removal.
  • This page removes no live file in this change. The candidate in the removal list below is a stylesheet selector only, with no behaviour attached, and is listed for removal in a stylesheet cleanup after a visual check at phone, tablet and desktop width.
  • Do not add a secret, token, connection string or API key to a page or a script while you check a candidate, as stated on Security.

Verified removal list

Work down the table in order before you remove anything. Only one candidate met every check in this pack. Every other candidate below is verified not dead, or Unknown, for the reason stated.

Candidate, file path, evidence of no references, and action
CandidateFile pathEvidence of no references in this packAction
Stylesheet selectors for an image inside a figure and inside a hero art blockpublic/site.css, in the hero art image rules and the small width hero art image rulesSearched every file in public and public guides for an image element inside a figure element and inside a hero art block. Result is zero matches. Every hero art block in the pack holds an inline svg element, and the only image elements in the pack are the logo and icon images in the site header, which are not inside a figure and not inside a hero art block. Searched for the exact class names in those rules across all site files. Result is zero matches for an image element in that place.List for removal in a stylesheet cleanup. Remove the two image rules and keep the svg rules in the same blocks. Check the home page hero, a feature page hero and a guide hero at phone, tablet and desktop width after removal. No behaviour changes, because no element in the pack matches the removed rules.
Exports in public site scriptspublic/site.js, public/status.html inline script, public/health.html inline script, public/offline.html inline script, public/request-demo.html inline script, public/guides/index.html inline script, public/guides/first-run-defaults.html inline script, public/guides/weekly-review.html inline script, public/guides/draft-fallback-contract.html inline scriptSearched every site script in the pack for the word export at the start of a statement. Result is zero exports in public site scripts. The only export shown in the pack is the example in APPKIT.md for a signed-in app module, and app modules are not in this pack. Each site script runs as an event listener, a breadcrumb builder, a form handler or a checklist panel, and each function in those scripts is called inside its own file.No removal. There is no dead export in the site part. Unknown: export list for signed-in app modules not in supplied site pack. Supply the app module list before you remove an app export.
Page routes with no trail entrypublic/site.js, the trails table and the feature pages listThe trails table covers the marketing pages and eleven guides. Other guide files in the pack have no trail entry, but each of those guides is linked from at least one other guide or marketing page in the pack, and the guides index script lists seventy five guides by href. A missing trail entry changes only the breadcrumb, it does not make the page unreachable.No removal. A missing trail entry is a navigation gap, not dead code. Add a trail entry only where a breadcrumb is wanted, and do not remove a page for a missing trail entry.
Service worker registration in two filespublic/site.js and public/app/index.htmlBoth files register the same service worker path with the same scope. The app shell file has no script tag for public site js, it loads the signed-in app script only, and the marketing pages load public site js only. Each registration runs on a different shell.No removal. Removing either registration would leave one shell without the service worker update check stated in Operations configuration inventory.
Liveness probe in two filespublic/health.html and public/health-readiness.htmlBoth files probe the dedicated health address first and fall back to the home page. The health page shows the result only. The health readiness page adds fixed choice controls and a safe summary that can be copied or downloaded, with no town data in the summary.No removal. The two probes are duplication to watch, not dead code, because the summary controls exist only on the second page.
Pages with no inbound link in this packpublic/analytics.html and public/health-readiness.htmlSearched every site file in the pack for a link to the analytics page path and to the health readiness page path. Result is zero inbound links in this pack for each page, with no trail entry in public site js and no header or footer link. Each page is still reachable by its direct URL, and each holds content that no other page in the pack states in full.No removal in this change. Mark both pages as orphan in setup notes. Unknown: external links and server routing for these paths not in supplied site pack. Record a written decision to link each page, to retire it, or to keep it for a direct URL, with the town office, before either page is removed.
Stylesheet classes for signed-in app screens named in APPKIT.mdpublic/site.cssAPPKIT.md names classes for signed-in screens, such as card, table, badge, button and form classes for the app views. Those classes are not defined in public site css, they are stated for the app stylesheet, and app view files are not in this pack.No removal and no addition in this change. Unknown: app stylesheet and app view files not in supplied site pack. Do not remove a site stylesheet rule for a missing app reference, and do not copy an app class into the site stylesheet.
Class with no site stylesheet definitionpublic/status.html, the facts list element on the status pageThe status page uses a facts class on its definition list. Searched public site css for that class. Result is zero definitions in the site stylesheet. The list still renders with the default list style, and the status script still builds rows for that list.No removal. This is a missing style, not dead code. Add a definition only where a town wants that list styled, and do not remove the class from the status page, because the status script addresses that list by its id and the class marks the list for a future style.

Guide outside the catalog, checked and not dead

The guides index script lists seventy five guides. The pack holds seventy seven guide files, including the guides index itself. One guide file is outside the catalog, sign in, sign out and workspace switching, at public/guides/sign-in-sign-out-workspace-switching.html. That guide was checked for an inbound link from another guide or marketing page in the pack, and it has at least one inbound link, so it is not dead code. The gap is a catalog gap, not a removal. The twenty three guides formerly listed in this section as outside the catalog are now in the catalog, verified against the catalog list in public/guides/index.html.

  • Sign in, sign out and workspace switching. The file is linked from at least one other page in the pack, and the file links out to pages that exist.
  • Do not remove a guide for a missing catalog entry. Add a catalog entry only where a town wants that guide in the filtered list on the guides index, with its audience and category from the filter list on that page.
  • A guide with no inbound link in a future pack is an orphan candidate. Record the search terms used on this page, then record a written decision to link it, to retire it, or to keep it for a direct URL, as with the two pages above.

Check a candidate before removal in order

Work through these steps in order for one candidate. Each step ends with what you should see when it worked.

  1. Search the site pack for the candidate name

    Search every file in public and public guides for the exact file path, class name, function name, export name and route path. You should see every reference, or zero references, for that candidate in this pack.

  2. Check the app pattern in APPKIT.md

    Read APPKIT.md for the app module, screen and stylesheet pattern. Where APPKIT.md states that a class, export or route belongs to the signed-in app, write Unknown for that candidate and supply the app file before removal. You should see Unknown, not a removal, for every app candidate.

  3. Check direct URL and server fallback use

    Read the health page, the offline page, the page not found page and the app shell for a direct URL or fallback role. A page that serves a fallback is not dead, even where no other page links to it. You should see the fallback role stated, or Unknown where server routing is not in this pack.

  4. Remove only a candidate with zero references and no fallback role

    Remove the candidate in the file that owns it, in the same change as this audit note where a note is kept. You should see the site build with the candidate gone, and every page that used the surrounding rules still rendering.

  5. Check the screens that used the surrounding rules

    Open the home page, a feature page, a guide page, the status page, the health page and the app shell at phone, tablet and desktop width. You should see no blank hero, no missing breadcrumb and no broken form, with the same headings and links as before removal.

What this page does not publish

This page does not publish a fee amount, a day count, a code section or a town rule. Those items are set by your town and are shown on your record where a supplied field states them, and are not added here without the town document that sets them.

  • Unknown: app module export list, app view list and app stylesheet not in supplied site pack. Supply those files before an app candidate is removed.
  • Unknown: server routing table and external links for public/analytics.html and public/health-readiness.html not in supplied site pack. Record a written decision before either page is removed.
  • Unknown: file size limit for uploads not in supplied site pack, where an upload step does not show a limit. Ask the town office for the limit for your record.
  • Unknown: any other jurisdiction, fee, date or code not stated on a record. Ask the town office for the town document for your record and do not use a value from another record or another town.

Bring your candidate list to the demo

Tell us which file, route, component, utility or stylesheet rule you want to check first, and we will run the searches on this page with your town workspace.

Request a demo