Skip to content

chore: remove dead code and fix locale keys and form labels - #317

Merged
MrYuion merged 12 commits into
developfrom
chore/cleanup
Sep 30, 2026
Merged

MrYuion merged 12 commits into
developfrom
chore/cleanup

Conversation

@MrYuion

@MrYuion MrYuion commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Problem

  • Users saw raw keys such as USERS.PASSWORDS_MATCH and DOMAINS.APPLICATION_SAVE_ERROR. Some keys had typos in the code or in the locale files. The authentication save success and error messages were swapped in all 7 locales.
  • Most form labels pointed at IDs that did not exist. Password toggles were bare icons.
  • There was dead code: an unused analytics service, the mailing lists pages, newSettings in 5 forms, and a hard-coded user email check in the user form.
  • DEFAULT_SETTINGS.debug was true in production.
  • CLAUDE.md listed old versions.

This is part of a stack of 6 PRs from a review of the whole app. Merge them in order: confirm-cancel, security, data loss, broken features, async errors, cleanup. Each PR targets the branch before it, so the diff shows only its own changes.

Fix

  • Add the missing keys, fix key typos, and swap the authentication messages back.
  • Link every label to its control. Custom components use role="group" with aria-labelledby. Password toggles are buttons with aria-pressed, and they keep focus.
  • Remove the dead code.
  • debug is off by default. It turns on in dev builds, or when localStorage BACKOFFICE.debug is 'true'.
  • Fix small bugs: timezone offsets (Kolkata showed +0500), LLLL YYYY week years, a null check in function-argument, and a while loop with no limit in the sidebar.
  • Update CLAUDE.md to Angular 22 and TypeScript 6.0.

Turning on strictNullChecks gives 345 errors today, before template errors. I left it off.

Checks

  • tsc, bun run lint, bunx vitest run (1011 tests) and bun run build pass. The test count drops because tests for deleted code went with it.
  • All 6 branches were merged and tested in a browser against a local PlaceOS stack (nightly images, with core and triggers). Test agents created their own records, checked results through the API, and removed the records after. A script checked that every label[for] in each form points at an element.

Made by Claude Opus 5.5 (1M context) in Claude Code (T3 Code).

🤖 Generated with Claude Code

MrYuion and others added 12 commits September 30, 2026 13:17
Rename typo'd locale keys (PASSOWRD_MATCH, APP_KEYS_SCOPES_REQUIRE,
APPLICATIONS_SAVE_*), swap the inverted AUTHENTICATION_SAVE_* messages,
add missing en-AU keys, and fix mistyped keys in code. Translate the
zone trigger remove tooltip and the confirm modal default title.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- function-argument: guard against a missing method or order list
- binding directive: test the model value, not the signal object
- counter: keep the last valid value on non-numeric input
- saml-source-form: give each mapping update its own timeout
- user-menu-tooltip: use rel="noopener noreferrer"
- simple-table: render the table as a div, not a button
- timezone-helpers: parse longOffset so zones like Sydney and
  Kolkata give correct offsets
- item.service: read route segments with parseUrl, so query params
  do not leak into the resource type or item id
- driver-form: drop a date comparison that was always true
- item-sidebar: load groups on NavigationEnd only, and stop the
  parent walk on cyclic data
- settings-field: stop recreating Monaco on window resize, and show
  an empty editor for null values
- new-terminal: escape log HTML before adding colour spans

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add ids so label for values match their inputs in the user, broker,
domain, application, zone and metadata forms. Use aria-labelledby for
mat-select fields. Replace copy-pasted chip grid aria-labels. Make the
user form show-password toggles real buttons with an aria-label.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- GoogleAnalyticsService (init() was never called, so send() did nothing)
- SettingsService overrides setter and _applyCssVariables
- hasNewVersion, clearCacheCheck, validateURL, validateMatch
- unused ApplicationLink*, CreateEditModalData and DriverInitData types
- unused AppComponent members and commented-out blocks
- duplicated, never-called newSettings() in five forms
- hardcoded email check that hid user password fields
- admin mailing lists feature, its routes and skipped e2e test
- unused overlay, context menu, sidebar, admin and guard members

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
DEFAULT_SETTINGS.debug was true, so production builds logged debug
output and skipped locale caching. Debug now turns on in dev mode, or
when localStorage BACKOFFICE.debug is set to true.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Angular 22, TypeScript ~6.0 and Tailwind 4. Also fix the locale folder
and the translate pipe and locale service names.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep a for attribute on the labels of mat-select fields, and drop the
table-wide click handler in simple-table. Its onclick output always
emitted 0 and had no listeners.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Give matInput fields the id their label points at. Use aria-labelledby
for mat-select fields. Give custom field components (a-counter,
item-search-field, image-list-field) role=group and aria-labelledby,
since a label for cannot target them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The toggle click bubbled to the mat-form-field container, which focused
the password input. A second Space then typed into the password. Stop
the click at the toggle in the user and repository forms, and give the
repository toggle an accessible name.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
backoffice Ready Ready Preview Sep 30, 2026 3:26am UTC

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

Base automatically changed from fix/async-error-handling to develop September 30, 2026 04:57
@MrYuion
MrYuion merged commit 7fc10c9 into develop Sep 30, 2026
5 checks passed
@MrYuion
MrYuion deleted the chore/cleanup branch September 30, 2026 04:59

This branch was successfully deployed

1 active deployment
Preview — b308f9ed Deployed Sep 30, 2026 by vercel[bot]
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