Skip to content

Commit 4d972e0

Browse files
Merge pull request #2513 from FarmBot/staging
v15.24.0
2 parents 410cb68 + 2d7b96a commit 4d972e0

191 files changed

Lines changed: 3639 additions & 2048 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ GEM
8787
base64 (0.3.0)
8888
bcrypt (3.1.22)
8989
benchmark (0.5.0)
90-
bigdecimal (4.1.1)
90+
bigdecimal (4.1.2)
9191
brakeman (8.0.4)
9292
racc
9393
builder (3.3.0)
@@ -133,14 +133,14 @@ GEM
133133
docile (1.4.1)
134134
drb (2.2.3)
135135
e2mmap (0.1.0)
136-
erb (6.0.2)
136+
erb (6.0.4)
137137
erubi (1.13.1)
138138
factory_bot (6.5.6)
139139
activesupport (>= 6.1.0)
140140
factory_bot_rails (6.5.1)
141141
factory_bot (~> 6.5)
142142
railties (>= 6.1.0)
143-
faker (3.6.1)
143+
faker (3.8.0)
144144
i18n (>= 1.8.11, < 2)
145145
faraday (2.14.1)
146146
faraday-net_http (>= 2.0, < 3.5)
@@ -200,7 +200,7 @@ GEM
200200
prism (>= 1.3.0)
201201
rdoc (>= 4.0.0)
202202
reline (>= 0.4.2)
203-
json (2.19.3)
203+
json (2.19.4)
204204
jsonapi-renderer (0.2.2)
205205
jwt (3.1.2)
206206
base64
@@ -236,10 +236,10 @@ GEM
236236
marcel (1.1.0)
237237
method_source (1.1.0)
238238
mini_mime (1.1.5)
239-
minitest (6.0.3)
239+
minitest (6.0.5)
240240
drb (~> 2.0)
241241
prism (~> 1.5)
242-
multi_json (1.19.1)
242+
multi_json (1.20.1)
243243
mutations (0.9.2)
244244
activesupport
245245
mutex_m (0.3.0)
@@ -262,7 +262,7 @@ GEM
262262
orm_adapter (0.5.0)
263263
os (1.1.4)
264264
ostruct (0.6.3)
265-
parallel (1.28.0)
265+
parallel (2.0.1)
266266
parser (3.3.11.1)
267267
ast (~> 2.4.1)
268268
racc
@@ -300,7 +300,7 @@ GEM
300300
rack-cors (3.0.0)
301301
logger
302302
rack (>= 3.0.14)
303-
rack-session (2.1.1)
303+
rack-session (2.1.2)
304304
base64 (>= 0.1.0)
305305
rack (>= 3.0.0)
306306
rack-test (2.2.0)
@@ -338,7 +338,7 @@ GEM
338338
tsort (>= 0.2)
339339
zeitwerk (~> 2.6)
340340
rainbow (3.1.1)
341-
rake (13.3.1)
341+
rake (13.4.2)
342342
rbtree (0.4.6)
343343
rdoc (7.2.0)
344344
erb
@@ -383,11 +383,11 @@ GEM
383383
rspec-support (3.13.7)
384384
rspec_junit_formatter (0.6.0)
385385
rspec-core (>= 2, < 4, != 2.12.0)
386-
rubocop (1.86.0)
386+
rubocop (1.86.1)
387387
json (~> 2.3)
388388
language_server-protocol (~> 3.17.0.2)
389389
lint_roller (~> 1.1.0)
390-
parallel (~> 1.10)
390+
parallel (>= 1.10)
391391
parser (>= 3.3.0.2)
392392
rainbow (>= 2.2.2, < 4.0)
393393
regexp_parser (>= 2.9.3, < 3.0)

app/views/layouts/dashboard.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
.initial-loading-text { position: absolute; top: 385px;
1818
text-align: center; width: 100%; padding-top: 10%; color: #434343; }
1919
</style>
20-
<%= stylesheet_link_tag *@css_assets %>
20+
<%= stylesheet_link_tag(*@css_assets, preload_links_header: false) %>
2121
<link rel="icon" href="/favicon.ico" type="image/x-icon">
2222
<link rel="apple-touch-icon" href="/images/favicon.png" type="image/png">
2323
<% manifest_file =

bun.lock

Lines changed: 77 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class AddNew3dViewOptionsToWebAppConfig < ActiveRecord::Migration[8.1]
2+
def up
3+
add_column :web_app_configs, :top_down_view, :boolean, default: false
4+
add_column :web_app_configs, :viewpoint_heading, :integer, default: 0
5+
end
6+
7+
def down
8+
remove_column :web_app_configs, :top_down_view
9+
remove_column :web_app_configs, :viewpoint_heading
10+
end
11+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class ChangeViewpointHeadingDefault < ActiveRecord::Migration[8.1]
2+
def change
3+
change_column_default(:web_app_configs, :viewpoint_heading, from: 0, to: 30)
4+
end
5+
end

db/structure.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,9 @@ CREATE TABLE public.web_app_configs (
20372037
show_missed_step_plot boolean DEFAULT false,
20382038
enable_3d_electronics_box_top boolean DEFAULT true,
20392039
three_d_garden boolean DEFAULT false,
2040-
dark_mode boolean DEFAULT true
2040+
dark_mode boolean DEFAULT true,
2041+
top_down_view boolean DEFAULT false,
2042+
viewpoint_heading integer DEFAULT 30
20412043
);
20422044

20432045

@@ -3763,6 +3765,8 @@ ALTER TABLE ONLY public.users
37633765
SET search_path TO "$user", public;
37643766

37653767
INSERT INTO "schema_migrations" (version) VALUES
3768+
('20260422013033'),
3769+
('20260417190743'),
37663770
('20260305192457'),
37673771
('20250930204600'),
37683772
('20250925195004'),

frontend/__test_support__/bun_test_setup.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const ensureSyntaxError = () => {
2828
writable: true,
2929
});
3030
};
31-
assign(globalThis as unknown as Record<string, unknown>);
31+
assign(globalThis);
3232
assign(globalAny.window as unknown as Record<string, unknown> | undefined);
3333
const windowCtor = globalAny.window?.constructor as
3434
| { prototype?: Record<string, unknown> }
@@ -74,13 +74,11 @@ const withAxiosDefaultExport = (factory: () => unknown) => () => {
7474

7575
if (globalAny.jest?.mock) {
7676
const originalMock = globalAny.jest.mock.bind(globalAny.jest);
77-
globalAny.jest.mock = ((specifier: string, factory?: unknown) => {
78-
const moduleFactory =
79-
typeof factory === "function" ? factory as () => unknown : undefined;
77+
globalAny.jest.mock = ((specifier: string, factory?: () => unknown) => {
8078
return specifier === "axios" && typeof factory === "function"
8179
? originalMock(specifier,
82-
withAxiosDefaultExport(moduleFactory as () => unknown))
83-
: originalMock(specifier, factory as never);
80+
withAxiosDefaultExport(factory))
81+
: originalMock(specifier, factory);
8482
}) as typeof globalAny.jest.mock;
8583
}
8684

@@ -229,6 +227,10 @@ const defaultThreeFiberState = () => ({
229227
scene: { traverse: jest.fn() },
230228
size: { width: 800, height: 600 },
231229
pointer: { x: 0, y: 0 },
230+
raycaster: {
231+
setFromCamera: jest.fn(),
232+
intersectObjects: jest.fn(() => []),
233+
},
232234
});
233235

234236
type MockLike<TArgs extends unknown[] = unknown[], TResult = unknown> = {
@@ -274,7 +276,7 @@ beforeEach(() => {
274276
resetMutableFixture(globalAny.globalConfig, globalConfigBaseline);
275277
} else {
276278
globalAny.globalConfig =
277-
cloneForReset(globalConfigBaseline) as Record<string, string>;
279+
cloneForReset(globalConfigBaseline);
278280
}
279281
globalThis.localStorage?.clear();
280282
globalThis.sessionStorage?.clear();

frontend/__test_support__/fake_designer_state.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export const fakeDesignerState = (): DesignerState => ({
5151
cropRadius: undefined,
5252
distanceIndicator: "",
5353
panelOpen: true,
54-
threeDTopDownView: false,
54+
threeDTopDownView: undefined,
55+
threeDCameraSelection: false,
5556
threeDExaggeratedZ: false,
5657
threeDTime: undefined,
5758
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
import "@testing-library/jest-dom";
22
import "./customMatchers";
3+
4+
expect.extend({
5+
toContainHTML(received: Element | { innerHTML?: string }, expected: string) {
6+
const actual = received?.innerHTML ?? "";
7+
const pass = actual.includes(expected);
8+
9+
return {
10+
pass,
11+
message: () =>
12+
`expected html to${pass ? " not" : ""} contain ` +
13+
`${this.utils.printExpected(expected)}\n` +
14+
`received: ${this.utils.printReceived(actual)}`,
15+
};
16+
},
17+
});

frontend/__test_support__/three_d_mocks.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jest.mock("../three_d_garden/components", () => ({
119119
instanceColor: { needsUpdate: false },
120120
}) as unknown as THREE.InstancedMesh);
121121
return <InstancedMeshForTests
122-
ref={ref as React.Ref<THREE.InstancedMesh>}
122+
ref={ref}
123123
{...rest} />;
124124
},
125125
),
@@ -203,6 +203,10 @@ jest.mock("@react-three/fiber", () => ({
203203
scene: { traverse: jest.fn() },
204204
size: { width: 800, height: 600 },
205205
pointer: { x: 0, y: 0 },
206+
raycaster: {
207+
setFromCamera: jest.fn(),
208+
intersectObjects: jest.fn(() => []),
209+
},
206210
})),
207211
useThree: jest.fn(() => ({
208212
gl: {
@@ -214,6 +218,10 @@ jest.mock("@react-three/fiber", () => ({
214218
scene: { traverse: jest.fn() },
215219
pointer: { x: 0, y: 0 },
216220
camera: new THREE.PerspectiveCamera(),
221+
raycaster: {
222+
setFromCamera: jest.fn(),
223+
intersectObjects: jest.fn(() => []),
224+
},
217225
size: { width: 800, height: 600 },
218226
})),
219227
extend: jest.fn(),

0 commit comments

Comments
 (0)