Skip to content

chore: miscellaneous updates and improvements - #4530

Merged
jekkos merged 1 commit into
opensourcepos:masterfrom
BudsieBuds:chore-miscupdates
May 8, 2026
Merged

jekkos merged 1 commit into
opensourcepos:masterfrom
BudsieBuds:chore-miscupdates

Conversation

@BudsieBuds

@BudsieBuds BudsieBuds commented May 4, 2026 •

Copy link
Copy Markdown
Member
  • reinstated 'update-licenses' task in gulp (accidentally removed in 3e844f2)
  • updated bootstrap, bootswatch, and various dev dependencies
  • refinded text across UI
  • applied consistency fixes
  • added 'number' and 'tel' input types to relevant settings
  • improved system info layout (still room for improvement, but better)

Summary by CodeRabbit

  • New Features

    • Added a search engine exclusion meta tag to prevent site indexing.
  • Improvements

    • Numeric input constraints added to barcode, SMTP, tax, and contact fields.
    • Email protocol labels capitalized for clarity.
    • Templates and emails now use the site language code for HTML lang.
    • Login view streamlined; system info spacing and minor license title capitalization adjusted.
  • Chores

    • Theme and build tooling updated; default build now runs license update.
  • Documentation

    • Changelog updated with new release section and link.

@coderabbitai

coderabbitai Bot commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Small UI and template tweaks: explicit input types/constraints and phone/tel types, header meta and theme loading refactor, minor template spacing and locale tag changes, one-line license title capitalization fix, changelog update, and build task + dependency version bumps.

Changes

System Modernization

Layer / File(s) Summary
Text/data tweak
app/Controllers/Config.php
License title capitalization changed: "Open Source Point Of Sale " → "Open Source Point of Sale ".
Form input shape
app/Views/configs/barcode_config.php, app/Views/configs/tax_config.php, app/Views/configs/email_config.php, app/Views/configs/info_config.php
Added explicit HTML input types/constraints: numeric fields now type="number" (+ min/max/step where applicable); phone/fax set to type="tel"; email protocol visible labels capitalized (submitted values unchanged).
Template wiring / markup
app/Views/barcodes/barcode_sheet.php, app/Views/login.php, app/Views/partial/header.php, app/Views/configs/system_info.php, app/Views/sales/*.php
Barcode sheet reformatted (no logic change); login initializes $request earlier; header adds meta name="robots" and refactors Bootswatch theme variable; system info min-height and extra <br> adjusted; email/work-order templates use current_language_code() for lang.
Changelog / Build integration
CHANGELOG.md, gulpfile.js, package.json
CHANGELOG.md adds a 3.4.1 release section and updates compare link; gulp default task now runs update-licenses after clean; bootstrap/bootswatch bumped to ^5.3.8; several devDependencies upgraded.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through views and trimmed a line,
Numbers now know bounds and tel fields shine,
Locale set tidy, robots hush the page,
Themes load neater, licenses staged—
A small clean nibble to steady the cage.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title "chore: miscellaneous updates and improvements" is vague and generic, using non-descriptive terms that do not convey meaningful information about the actual changeset despite covering multiple substantive areas. Consider a more specific title that captures the primary changes, such as "chore: update dependencies, add input type enhancements, and reinstate license task" or similar.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@BudsieBuds
BudsieBuds requested a review from jekkos May 4, 2026 22:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
app/Views/configs/tax_config.php (1)

53-63: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Missing step attribute will block decimal tax rates.

type="number" has a step size of 1 by default; if a user tries to enter a decimal value (e.g., 8.25), it will be considered invalid by browser constraint validation. Tax rates like 8.25 %, 6.875 %, etc. are common, and to_tax_decimals() already signals that decimal values are expected. Without step, the browser will reject decimal submissions before jQuery Validate even runs, breaking the form for any installation with a fractional tax rate.

Add 'step' => 'any' (or a precision like 'step' => '0.001') to both inputs:

🐛 Proposed fix
 <?= form_input([
     'type'  => 'number',
+    'step'  => 'any',
     'min'   => '0',
     'max'   => '100',
     'name'  => 'default_tax_1_rate',
     ...
 ]) ?>
 ...
 <?= form_input([
     'type'  => 'number',
+    'step'  => 'any',
     'min'   => '0',
     'max'   => '100',
     'name'  => 'default_tax_2_rate',
     ...
 ]) ?>

Also applies to: 77-87

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/Views/configs/tax_config.php` around lines 53 - 63, The number inputs for
tax rates (the form_input calls rendering 'default_tax_1_rate' and the similar
'default_tax_2_rate') lack a step attribute, which prevents entering decimal
percentages; update both form_input configurations to include a 'step' key
(e.g., 'step' => 'any' or a fixed precision like '0.001') so browsers accept
fractional tax rates and match the to_tax_decimals() behavior.
app/Views/configs/barcode_config.php (1)

206-213: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

barcode_num_in_row is missing min="1".

Without a lower bound, the browser accepts 0 or negative values. The existing JS rule is number: true which also doesn't enforce a minimum, so 0 barcodes-per-row could reach the server and produce a broken layout. Other numeric inputs in this form (e.g., barcode_width, barcode_height) all carry explicit min constraints — this one should too.

🐛 Proposed fix
 <?= form_input([
     'type'  => 'number',
+    'min'   => '1',
     'name'  => 'barcode_num_in_row',
     ...
 ]) ?>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/Views/configs/barcode_config.php` around lines 206 - 213, The number
input for barcode_num_in_row lacks a minimum constraint, allowing 0 or negative
values; update the form_input call for 'barcode_num_in_row' (the input with
name/id 'barcode_num_in_row' and class 'form-control input-sm required') to
include a min="1" attribute so the browser enforces at least one barcode per row
(and mirror any server-side validation as needed).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/Views/login.php`:
- Line 14: The view uses $request (e.g., in the <html lang="<?=
$request->getLocale() ?>"> tag) before it is initialized, causing an undefined
variable error; move the $request initialization block (the code that
creates/assigns $request) from its duplicate location later in the file to
immediately after the file docblock/top of the view (following the pattern in
partial/header.php), and remove the duplicate initialization further down (lines
where $request is re-created) so $request is defined before any usage like
$request->getLocale().

---

Outside diff comments:
In `@app/Views/configs/barcode_config.php`:
- Around line 206-213: The number input for barcode_num_in_row lacks a minimum
constraint, allowing 0 or negative values; update the form_input call for
'barcode_num_in_row' (the input with name/id 'barcode_num_in_row' and class
'form-control input-sm required') to include a min="1" attribute so the browser
enforces at least one barcode per row (and mirror any server-side validation as
needed).

In `@app/Views/configs/tax_config.php`:
- Around line 53-63: The number inputs for tax rates (the form_input calls
rendering 'default_tax_1_rate' and the similar 'default_tax_2_rate') lack a step
attribute, which prevents entering decimal percentages; update both form_input
configurations to include a 'step' key (e.g., 'step' => 'any' or a fixed
precision like '0.001') so browsers accept fractional tax rates and match the
to_tax_decimals() behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2d1f40be-e086-4e08-97f0-7342e7cc7a5d

📥 Commits

Reviewing files that changed from the base of the PR and between 7edefe8 and 6c2b440.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • app/Controllers/Config.php
  • app/Views/configs/barcode_config.php
  • app/Views/configs/email_config.php
  • app/Views/configs/info_config.php
  • app/Views/configs/system_info.php
  • app/Views/configs/tax_config.php
  • app/Views/login.php
  • app/Views/partial/header.php
  • gulpfile.js
  • package.json

Comment thread app/Views/login.php Resolved
@BudsieBuds
BudsieBuds force-pushed the chore-miscupdates branch from 6c2b440 to c1fa9db Compare May 4, 2026 23:29

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/Views/configs/email_config.php (1)

58-63: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Constrain numeric inputs to valid integer ranges.

At Line 58 and Line 87, type="number" is a good start, but it still permits invalid values (e.g., decimals/negatives). Please add integer/range constraints for SMTP semantics (especially port).

Suggested patch
                     <?= form_input([
                         'type'  => 'number',
+                        'min'   => '1',
+                        'max'   => '65535',
+                        'step'  => '1',
                         'name'  => 'smtp_port',
                         'id'    => 'smtp_port',
                         'class' => 'form-control input-sm',
                         'value' => $config['smtp_port']
                     ]) ?>
@@
                     <?= form_input([
                         'type'  => 'number',
+                        'min'   => '1',
+                        'step'  => '1',
                         'name'  => 'smtp_timeout',
                         'id'    => 'smtp_timeout',
                         'class' => 'form-control input-sm',
                         'value' => $config['smtp_timeout']
                     ]) ?>

Also applies to: 87-92

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/Views/configs/email_config.php` around lines 58 - 63, Add integer/range
constraints to the numeric SMTP inputs (e.g., the 'smtp_port' form field and the
similar block at lines 87-92) so the browser prevents decimals/negatives and
enforces valid port semantics: update the form input attribute arrays for
'smtp_port' to include 'step' => '1', 'min' => '1', 'max' => '65535' and ensure
the 'value' uses an integer cast (e.g., intval($config['smtp_port'])); apply the
same changes to the other numeric SMTP field(s) referenced in the second block
(add 'step', 'min', 'max' and integer-cast the value).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@app/Views/configs/email_config.php`:
- Around line 58-63: Add integer/range constraints to the numeric SMTP inputs
(e.g., the 'smtp_port' form field and the similar block at lines 87-92) so the
browser prevents decimals/negatives and enforces valid port semantics: update
the form input attribute arrays for 'smtp_port' to include 'step' => '1', 'min'
=> '1', 'max' => '65535' and ensure the 'value' uses an integer cast (e.g.,
intval($config['smtp_port'])); apply the same changes to the other numeric SMTP
field(s) referenced in the second block (add 'step', 'min', 'max' and
integer-cast the value).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a499c7e9-5a02-4a4d-91c8-44a2a6c912f8

📥 Commits

Reviewing files that changed from the base of the PR and between 6c2b440 and c1fa9db.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • app/Controllers/Config.php
  • app/Views/configs/barcode_config.php
  • app/Views/configs/email_config.php
  • app/Views/configs/info_config.php
  • app/Views/configs/system_info.php
  • app/Views/configs/tax_config.php
  • app/Views/login.php
  • app/Views/partial/header.php
  • gulpfile.js
  • package.json
✅ Files skipped from review due to trivial changes (3)
  • gulpfile.js
  • app/Controllers/Config.php
  • app/Views/configs/info_config.php
🚧 Files skipped from review as they are similar to previous changes (5)
  • package.json
  • app/Views/partial/header.php
  • app/Views/configs/barcode_config.php
  • app/Views/login.php
  • app/Views/configs/tax_config.php

@BudsieBuds
BudsieBuds requested a review from objecttothis May 6, 2026 15:30

@objecttothis objecttothis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great work. Just the one change.

Comment thread app/Views/login.php Resolved
jekkos
jekkos previously approved these changes May 7, 2026

@jekkos jekkos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me

objecttothis
objecttothis previously approved these changes May 7, 2026
@BudsieBuds
BudsieBuds dismissed stale reviews from objecttothis and jekkos via 1271cd5 May 7, 2026 16:29
@BudsieBuds
BudsieBuds force-pushed the chore-miscupdates branch from c1fa9db to 1271cd5 Compare May 7, 2026 16:29
@objecttothis

Copy link
Copy Markdown
Member

@BudsieBuds I think you just need to click "Resolve conversation" once you decide what you want to do with the getLocale() call in the view and it should unblock the merge.

@BudsieBuds
BudsieBuds force-pushed the chore-miscupdates branch from 1271cd5 to 4242424 Compare May 7, 2026 20:32
@BudsieBuds

Copy link
Copy Markdown
Member Author

@BudsieBuds I think you just need to click "Resolve conversation" once you decide what you want to do with the getLocale() call in the view and it should unblock the merge.

@objecttothis After looking into it a bit more, I decided to switch to <?= current_language_code() ?> from the locale helper. This respects the employee-specific language setting. I also rebased the branch. If everything looks good on your end and it's approved, I'll proceed with the merge.

@BudsieBuds
BudsieBuds requested review from jekkos and objecttothis May 7, 2026 20:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/Views/configs/tax_config.php`:
- Around line 54-57: postSaveTax() currently relies on client-side min/max and
parse_tax() but lacks server-side bounds checks; after calling parse_tax() for
default_tax_1_rate and default_tax_2_rate validate that each value is numeric
and within the inclusive range 0..100 (e.g., is_numeric/floatval and value >= 0
&& value <= 100), and if not return/raise a validation error (or add an error to
the existing validation flow) instead of saving; update the handler that
persists the taxes to reject out-of-range inputs and include a clear error
message mentioning the specific field names default_tax_1_rate and
default_tax_2_rate so invalid values are not stored.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cba95c79-df72-46db-9329-73614ff77bf7

📥 Commits

Reviewing files that changed from the base of the PR and between 1271cd5 and 4242424.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (13)
  • app/Controllers/Config.php
  • app/Views/barcodes/barcode_sheet.php
  • app/Views/configs/barcode_config.php
  • app/Views/configs/email_config.php
  • app/Views/configs/info_config.php
  • app/Views/configs/system_info.php
  • app/Views/configs/tax_config.php
  • app/Views/login.php
  • app/Views/partial/header.php
  • app/Views/sales/quote_email.php
  • app/Views/sales/work_order_email.php
  • gulpfile.js
  • package.json
✅ Files skipped from review due to trivial changes (3)
  • app/Views/sales/work_order_email.php
  • app/Views/configs/info_config.php
  • app/Views/barcodes/barcode_sheet.php
🚧 Files skipped from review as they are similar to previous changes (9)
  • app/Views/sales/quote_email.php
  • gulpfile.js
  • app/Views/configs/system_info.php
  • app/Views/login.php
  • app/Views/configs/barcode_config.php
  • app/Controllers/Config.php
  • app/Views/configs/email_config.php
  • app/Views/partial/header.php
  • package.json

Comment thread app/Views/configs/tax_config.php Resolved
- reinstated 'update-licenses' task in gulp (accidentally removed in 3e844f2)
- updated bootstrap, bootswatch, and various dev dependencies
- refinded text across UI
- applied consistency fixes
- added 'number' and 'tel' input types to relevant settings
- improved system info layout (still room for improvement, but better)
- updated and fixed changelog
@BudsieBuds
BudsieBuds force-pushed the chore-miscupdates branch from 4242424 to b7ce6d1 Compare May 7, 2026 21:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/Views/sales/quote_email.php`:
- Line 18: The lang attribute uses unescaped output from
current_language_code(); update the template to pass that value through the
esc() output-escaping helper so the attribute becomes lang="<?=
esc(current_language_code()) ?>". Modify the HTML in quote_email.php by wrapping
the current_language_code() call with esc() (use the esc() helper around the
current_language_code() invocation) to ensure all output is escaped per project
guidelines.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 36f16185-afc2-4c9d-b0d2-a13df6f15ece

📥 Commits

Reviewing files that changed from the base of the PR and between 4242424 and b7ce6d1.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (14)
  • CHANGELOG.md
  • app/Controllers/Config.php
  • app/Views/barcodes/barcode_sheet.php
  • app/Views/configs/barcode_config.php
  • app/Views/configs/email_config.php
  • app/Views/configs/info_config.php
  • app/Views/configs/system_info.php
  • app/Views/configs/tax_config.php
  • app/Views/login.php
  • app/Views/partial/header.php
  • app/Views/sales/quote_email.php
  • app/Views/sales/work_order_email.php
  • gulpfile.js
  • package.json
✅ Files skipped from review due to trivial changes (7)
  • app/Views/sales/work_order_email.php
  • app/Controllers/Config.php
  • app/Views/configs/barcode_config.php
  • app/Views/configs/info_config.php
  • app/Views/configs/email_config.php
  • app/Views/barcodes/barcode_sheet.php
  • package.json
🚧 Files skipped from review as they are similar to previous changes (5)
  • app/Views/login.php
  • app/Views/configs/tax_config.php
  • app/Views/configs/system_info.php
  • app/Views/partial/header.php
  • gulpfile.js

Comment thread app/Views/sales/quote_email.php Resolved
@BudsieBuds

Copy link
Copy Markdown
Member Author

@jekkos @objecttothis Could someone with admin access update the branch protection rules? The PR can’t be merged because Travis CI is still listed as a required check, but Travis is no longer running for this repository. GitHub is waiting for a status that will never be reported. Thanks!

@jekkos
jekkos merged commit 42ba39d into opensourcepos:master May 8, 2026
6 checks passed
@jekkos

jekkos commented May 8, 2026 •

Copy link
Copy Markdown
Member

@BudsieBuds i have changed the protection rules and merged your changes. Btw I continued your work on bootstrap 5 in a new branch, but have not taken it further for now.

I ran it through coderabbit and the agents fixed any issue they found. But no further validation was done
#4445

@BudsieBuds
BudsieBuds deleted the chore-miscupdates branch May 8, 2026 09:58
@BudsieBuds BudsieBuds mentioned this pull request May 8, 2026
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.

3 participants