Skip to content

Commit 963241c

Browse files
authored
Merge branch 'main' into claude/migrate-operator-field-01NuJoaKJx2xbdJKFTCXeiWE
2 parents 0d9886e + a3d78f2 commit 963241c

33 files changed

Lines changed: 186 additions & 180 deletions

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
bundle exec rake coverage:parallel
4646
4747
- name: Deploy to Bunny
48-
uses: R-J-dev/bunny-deploy@v2.0.6
48+
uses: R-J-dev/bunny-deploy@v2.1.1
4949
with:
5050
access-key: ${{ secrets.BUNNY_ACCESS_KEY }}
5151
directory-to-upload: coverage

.github/workflows/security-scan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ permissions:
55

66
on:
77
pull_request:
8+
merge_group:
89
schedule:
910
- cron: '0 0 * * 0' # Weekly scan on Sundays
1011

.github/workflows/test-ruby.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: "Test: Ruby"
22

33
on:
44
pull_request:
5+
merge_group:
56
workflow_call:
67

78
jobs:

ATTRIBUTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This project uses the following open source dependencies:
44

5-
Generated on: 2025-12-01
5+
Generated on: 2026-02-09
66
Total dependencies: 151
77

88
## Dependencies by License

Gemfile.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,19 @@ GEM
8585
activesupport (>= 6.0.0)
8686
ast (2.4.3)
8787
aws-eventstream (1.4.0)
88-
aws-partitions (1.1180.0)
89-
aws-sdk-core (3.236.0)
88+
aws-partitions (1.1196.0)
89+
aws-sdk-core (3.240.0)
9090
aws-eventstream (~> 1, >= 1.3.0)
9191
aws-partitions (~> 1, >= 1.992.0)
9292
aws-sigv4 (~> 1.9)
9393
base64
9494
bigdecimal
9595
jmespath (~> 1, >= 1.6.1)
9696
logger
97-
aws-sdk-kms (1.116.0)
98-
aws-sdk-core (~> 3, >= 3.234.0)
97+
aws-sdk-kms (1.118.0)
98+
aws-sdk-core (~> 3, >= 3.239.1)
9999
aws-sigv4 (~> 1.5)
100-
aws-sdk-s3 (1.202.0)
100+
aws-sdk-s3 (1.208.0)
101101
aws-sdk-core (~> 3, >= 3.234.0)
102102
aws-sdk-kms (~> 1)
103103
aws-sigv4 (~> 1.5)
@@ -116,7 +116,7 @@ GEM
116116
bigdecimal (3.3.1)
117117
bindata (2.5.1)
118118
blueprinter (1.2.1)
119-
brakeman (7.1.1)
119+
brakeman (8.0.2)
120120
racc
121121
builder (3.3.0)
122122
capybara (3.40.0)
@@ -134,7 +134,7 @@ GEM
134134
sorbet-runtime (~> 0.5)
135135
chronic (0.10.2)
136136
chunky_png (1.4.0)
137-
concurrent-ruby (1.3.5)
137+
concurrent-ruby (1.3.6)
138138
connection_pool (2.5.4)
139139
cose (1.3.1)
140140
cbor (~> 0.5.9)
@@ -470,10 +470,10 @@ GEM
470470
addressable (>= 2.3.5)
471471
faraday (>= 0.17.3, < 3)
472472
securerandom (0.4.1)
473-
sentry-rails (6.1.0)
473+
sentry-rails (6.2.0)
474474
railties (>= 5.2.0)
475-
sentry-ruby (~> 6.1.0)
476-
sentry-ruby (6.1.0)
475+
sentry-ruby (~> 6.2.0)
476+
sentry-ruby (6.2.0)
477477
bigdecimal
478478
concurrent-ruby (~> 1.0, >= 1.0.2)
479479
simplecov (0.22.0)
@@ -516,7 +516,7 @@ GEM
516516
actionpack (>= 6.1)
517517
activesupport (>= 6.1)
518518
sprockets (>= 3.0.0)
519-
sqlite3 (2.7.4-x86_64-linux-gnu)
519+
sqlite3 (2.8.1-x86_64-linux-gnu)
520520
standard (1.51.1)
521521
language_server-protocol (~> 3.17.0.2)
522522
lint_roller (~> 1.0)

app/assets/stylesheets/users.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@
88
text-align: center;
99
}
1010
}
11+
12+
.users-list data[value="active"] {
13+
color: #2e7d32;
14+
font-weight: bold;
15+
}
16+
17+
.users-list data[value="inactive"] {
18+
color: #c62828;
19+
}

app/controllers/concerns/safety_standards_turbo_streams.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
# frozen_string_literal: true
33

44
module SafetyStandardsTurboStreams
5+
# Extends InspectionTurboStreams to add safety standards streams
56
extend ActiveSupport::Concern
67
extend T::Sig
78

89
private
910

10-
sig do
11-
params(additional_info: T.nilable(String)).returns(T::Array[T.untyped])
12-
end
11+
sig { params(additional_info: T.nilable(String)).returns(T::Array[T.untyped]) }
1312
def success_turbo_streams(additional_info: nil)
1413
super + safety_standards_turbo_streams
1514
end

app/controllers/units_controller.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ def validate_badge_id_param
160160

161161
normalized_id = normalize_unit_id(id_param)
162162
return redirect_to_existing_unit(normalized_id) if unit_exists?(normalized_id)
163-
return redirect_to_invalid_badge unless badge_exists?(normalized_id)
164163

165-
@validated_badge_id = normalized_id
164+
# Only set validated badge ID if it exists, otherwise let model validation handle it
165+
@validated_badge_id = normalized_id if badge_exists?(normalized_id)
166166
end
167167

168168
def log_unit_event(action, unit, details = nil, changed_data = nil)
@@ -380,11 +380,6 @@ def redirect_to_existing_unit(normalized_id)
380380
redirect_to Unit.find(normalized_id)
381381
end
382382

383-
def redirect_to_invalid_badge
384-
flash[:alert] = I18n.t("units.validations.invalid_badge_id")
385-
redirect_to units_path
386-
end
387-
388383
def log_resource_event(action, unit, details, changed_data)
389384
Event.log(
390385
user: current_user,

app/helpers/users_helper.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,17 @@ def format_job_time(time)
2020
return "Never" unless time
2121
"#{time_ago_in_words(time)} ago"
2222
end
23+
24+
sig { params(user: User).returns(String) }
25+
def user_activity_indicator(user)
26+
if user.is_active?
27+
days = (Date.current - user.created_at.to_date).to_i
28+
label = I18n.t("users.status.active", days:)
29+
tag.data(label, value: "active")
30+
else
31+
days = (Date.current - user.active_until).to_i
32+
label = I18n.t("users.status.inactive", days:)
33+
tag.data(label, value: "inactive")
34+
end
35+
end
2336
end

app/javascript/passkey_login.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// Passkey login functionality
2-
import { base64ToArrayBuffer, arrayBufferToBase64 } from "./webauthn_utils";
2+
import {
3+
base64ToArrayBuffer,
4+
arrayBufferToBase64,
5+
postJson,
6+
} from "./webauthn_utils";
37

48
document.addEventListener("turbo:load", () => {
59
const loginButtons = document.querySelectorAll(
@@ -115,16 +119,11 @@ document.addEventListener("turbo:load", () => {
115119
},
116120
};
117121

118-
const callbackResponse = await fetch("/passkey_callback", {
119-
method: "POST",
120-
headers: {
121-
"Content-Type": "application/json",
122-
Accept: "application/json",
123-
"X-CSRF-Token": csrfToken,
124-
},
125-
body: JSON.stringify(credentialData),
126-
credentials: "same-origin",
127-
});
122+
const callbackResponse = await postJson(
123+
"/passkey_callback",
124+
credentialData,
125+
csrfToken,
126+
);
128127

129128
if (callbackResponse.ok) {
130129
window.location.href = "/inspections";

0 commit comments

Comments
 (0)