Skip to content

Commit 853085e

Browse files
chore: resolve merge conflicts from branch dev
* 'dev' of github.com:Autodesk/synthesis: (227 commits) chore: fix ci fix: biome lint and toasts ui Fix Drag Mode During Gizmo Move (#1480) chore: remove unneeded jsx fragments (#1474) Update Tabs Indicator on Content Size Change (#1428) Fix Configuration Input Selection (#1460) refactor: create useHoldPhysicsPause hook style: ran formatter Improved 2024 Field Collisions fix: make cancelling work and make endgame reset fix: use start time delay for autonomous feat: make match mode timer time-based feat: improve match result modal styling refactor: use null instead of explicit fallback value for camera selection refactor: use string UUIDs instead of incrementing integers fix: update array bracket formatting chore: refactor out new build parts functionality chore: update comments feat: obj mesh reduction fix feat: glTF dense meshes extra rung ...
2 parents 228ca2d + eda7a3d commit 853085e

211 files changed

Lines changed: 7938 additions & 2589 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.

.github/workflows/NixTest.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test Nix
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
nix-flake-check:
9+
name: Nix Flake Check
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v7
13+
14+
- uses: cachix/install-nix-action@v31
15+
16+
- name: Nix Flake Check
17+
run: nix flake check
18+
19+
fission-playwright:
20+
name: Fission Playwright
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v7
24+
25+
- uses: cachix/install-nix-action@v31
26+
27+
- name: Cache Node Dependencies
28+
uses: actions/cache@v6
29+
with:
30+
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
31+
path: "fission/node_modules"
32+
restore-keys: |
33+
${{runner.os}}-npm-fission-
34+
${{runner.os}}-npm
35+
36+
- name: Install Dependencies
37+
working-directory: "fission"
38+
run: nix develop .#fission --command bash -c "bun install --frozen-lockfile"
39+
40+
- name: Run Playwright Tests
41+
working-directory: "fission"
42+
run: |
43+
nix develop .#fission --command bash -c "bun run test run ./src/test/APSTesting.test.ts"

.github/workflows/slack/github.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,17 @@ const parseImages = (body: string): ParsedBody => {
228228
return { text, images }
229229
}
230230

231+
const COMMENT = /<!--[\s\S]*?-->[ \t]*\r?\n?/g
232+
const BODY_LIMIT = 1000
233+
234+
/**
235+
* Truncates text to a character limit, appending an ellipsis
236+
*
237+
* @return string
238+
*/
239+
const truncate = (text: string, limit: number): string =>
240+
text.length > limit ? `${text.slice(0, limit).trimEnd()}…` : text
241+
231242
const SUGGESTION = /```suggestion\r?\n(.*?)```/gs
232243

233244
/**
@@ -248,14 +259,17 @@ const jiraSection = (pr: PullRequest): Block => {
248259
}
249260

250261
/**
251-
* Renders the PR body as a text section plus any inline images
262+
* Renders the PR body as a text section plus any inline images, dropping
263+
* template comments and capping length
252264
*
253265
* @return Block[]
254266
*/
255267
const prBodyBlocks = (body: string | null): Block[] => {
256268
if (!body) return []
257-
const { text, images } = parseImages(body)
258-
return [...(text ? [section(mrkdwn(text))] : []), ...images]
269+
// strip comments first so images inside them don't get extracted
270+
const { text, images } = parseImages(body.replace(COMMENT, ""))
271+
const capped = truncate(text, BODY_LIMIT)
272+
return [...(capped ? [section(mrkdwn(capped))] : []), ...images]
259273
}
260274

261275
/**

.github/workflows/slack/pr_review.ts

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,45 @@ const send = async () => {
6161
const repo_owner = github.repository_owner
6262
const repo_name = github.event.repository.name
6363
const pr_number = github.event.pull_request.number
64+
const pr_url = `https://api.github.com/repos/${repo_owner}/${repo_name}/pulls/${pr_number}`
6465

6566
if (github.event_name === "pull_request_review_comment") {
6667
const event = reviewCommentEventFromContext(github)
67-
68+
const review_id = github.event.comment.pull_request_review_id
6869
const reply_to_id = github.event.comment.in_reply_to_id
69-
if (reply_to_id) {
70-
const url = `https://api.github.com/repos/${repo_owner}/${repo_name}/pulls/${pr_number}/comments?per_page=100`
71-
const res = await ghGet(url)
70+
71+
// real review renders this comment in its collapsible
72+
if (review_id) {
73+
const res = await ghGet(`${pr_url}/reviews/${review_id}`)
74+
75+
if (res.ok) {
76+
const review: any = await res.json()
77+
if (review.body || review.state?.toLowerCase() !== "commented")
78+
process.exit(0)
79+
}
80+
}
81+
82+
if (review_id || reply_to_id) {
83+
const res = await ghGet(`${pr_url}/comments?per_page=100`)
7284

7385
if (res.ok) {
7486
const all: any[] = await res.json()
75-
// in_reply_to_id = thread root; want newest reply before mine
87+
const siblings = all.filter(
88+
(c) => c.pull_request_review_id === review_id,
89+
)
90+
// wrapper holds one comment; more = batched review
91+
if (siblings.length > 1) process.exit(0)
92+
// in_reply_to_id = thread root; want newest before mine
7693
const parent = all
7794
.filter(
7895
(c) =>
79-
(c.id === reply_to_id || c.in_reply_to_id === reply_to_id) &&
96+
(c.id === reply_to_id ||
97+
c.in_reply_to_id === reply_to_id) &&
8098
c.id !== github.event.comment.id,
8199
)
82100
.sort((a, b) => a.id - b.id)
83101
.at(-1)
84-
if (parent?.user && parent.body != null) {
102+
if (reply_to_id && parent?.user && parent.body != null) {
85103
event.replyTo = { author: parent.user.login, body: parent.body }
86104
}
87105
}
@@ -99,13 +117,14 @@ const send = async () => {
99117
if (github.event.action !== "dismissed") {
100118
const review_id = github.event.review.id
101119

102-
const url = `https://api.github.com/repos/${repo_owner}/${repo_name}/pulls/${pr_number}/reviews/${review_id}/comments?per_page=100`
103-
const comments_res = await ghGet(url)
120+
const comments_res = await ghGet(
121+
`${pr_url}/reviews/${review_id}/comments?per_page=100`,
122+
)
104123

105124
comments = await comments_res.json()
106125
}
107126

108-
// lone bodyless comment = single/reply wrapper, already sent; batches (>1) kept
127+
// lone bodyless comment = wrapper, already sent; batches kept
109128
if (
110129
github.event.review.state === "commented" &&
111130
!github.event.review.body &&
@@ -116,17 +135,22 @@ const send = async () => {
116135

117136
const event = reviewEventFromContext(github)
118137

119-
// dismiss message isn't in the payload; pull it from the timeline
138+
// dismiss message isn't in the payload
120139
if (github.event.action === "dismissed") {
121140
const url = `https://api.github.com/repos/${repo_owner}/${repo_name}/issues/${pr_number}/timeline?per_page=100`
122141
const res = await ghGet(url)
123142

124143
if (res.ok) {
125144
const events: any[] = await res.json()
126145
const dismissal = events
127-
.filter(e => e.event === "review_dismissed" && e.dismissed_review?.review_id === github.event.review.id)
146+
.filter(
147+
(e) =>
148+
e.event === "review_dismissed" &&
149+
e.dismissed_review?.review_id === github.event.review.id,
150+
)
128151
.at(-1)
129-
if (dismissal?.dismissed_review?.dismissal_message) event.review.body = dismissal.dismissed_review.dismissal_message
152+
if (dismissal?.dismissed_review?.dismissal_message)
153+
event.review.body = dismissal.dismissed_review.dismissal_message
130154
}
131155
}
132156

NOTICE.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ This product bundles the following third-party sound assets:
1818

1919
For more information, contact FIRST Robotics or refer to your licensing agreement.
2020

21-
This product also includes Autodesk brand marks. See MARKS-LICENSE.md for more information.
21+
3. Files licensed from WPILib:
22+
- simulation/SyntheSimJava/src/main/java/com/autodesk/synthesis/cscore/CameraServer.java
23+
- simulation/SyntheSimJava/src/main/java/com/autodesk/synthesis/cscore/CvSink.java
24+
25+
This product also includes Autodesk brand marks. See MARKS-LICENSE.md for more information.

exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Materials.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
OPACITY_RAMPING_CONSTANT = 14.0
1010

11+
# Appearances with this name are exported fully transparent
12+
FULLY_TRANSPARENT_APPEARANCE_NAME = ["air", "polycarbonate (clear)", "glass (clear)"]
13+
1114
# Update tables as needed for UX and needed materials
1215
STATIC_FRICTION_COEFFS = {
1316
"Aluminum": 1.1,
@@ -239,6 +242,18 @@ def getMaterialAppearance(
239242
if construct_info_result.is_err():
240243
return construct_info_result
241244

245+
# Make the transparent material actually transparent
246+
if fusionAppearance.name.lower() in FULLY_TRANSPARENT_APPEARANCE_NAME:
247+
appearance.roughness = 0.5
248+
appearance.metallic = 0.0
249+
appearance.specular = 0.0
250+
color = appearance.albedo
251+
color.R = 255
252+
color.G = 255
253+
color.B = 255
254+
color.A = 0
255+
return Ok(None)
256+
242257
appearance.roughness = 0.9
243258
appearance.metallic = 0.3
244259
appearance.specular = 0.5

fission/biome.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.5.6/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
@@ -26,15 +26,16 @@
2626
"react": "all"
2727
},
2828
"rules": {
29-
"recommended": false,
29+
"preset": "none",
3030
"complexity": {
3131
"noAdjacentSpacesInRegex": "error",
3232
"noBannedTypes": "error",
3333
"noExtraBooleanCast": "error",
3434
"noUselessCatch": "error",
3535
"noUselessEscapeInRegex": "error",
3636
"noUselessThisAlias": "error",
37-
"noUselessTypeConstraint": "error"
37+
"noUselessTypeConstraint": "error",
38+
"noUselessFragments": "error"
3839
},
3940
"correctness": {
4041
"noConstAssign": "error",
@@ -72,8 +73,9 @@
7273
"useAsConstAssertion": "error",
7374
"useComponentExportOnlyModules": "warn",
7475
"useImportType": "warn",
76+
"useConsistentArrayType": "error",
7577
"useNamingConvention": {
76-
"level": "warn",
78+
"level": "error",
7779
"options": {
7880
"strictCase": false,
7981
"requireAscii": true,
@@ -120,7 +122,7 @@
120122
"kind": "function"
121123
},
122124
"match": "([^_]*)",
123-
"formats": ["camelCase"]
125+
"formats": ["camelCase", "PascalCase"]
124126
},
125127
{
126128
"selector": {
@@ -238,7 +240,8 @@
238240
"noUnsafeNegation": "error",
239241
"noWith": "error",
240242
"useGetterReturn": "error",
241-
"noTsIgnore": "error"
243+
"noTsIgnore": "error",
244+
"noArrayIndexKey": "warn"
242245
}
243246
},
244247
"includes": ["src/**/*.{ts,tsx,js,json}", "./*.{ts,js,json,html}"]
@@ -264,6 +267,11 @@
264267
"selfCloseVoidElements": "always"
265268
}
266269
},
270+
"css": {
271+
"parser": {
272+
"tailwindDirectives": true
273+
}
274+
},
267275
"overrides": [
268276
{
269277
"includes": ["*.json"],

fission/bun.lock

Lines changed: 14 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fission/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"dev": "vite --open",
1313
"test": "vitest",
1414
"test:coverage": "vitest run --coverage",
15+
"test:asan": "sh ./scripts/test-asan.sh",
1516
"build": "tsc && vite build",
1617
"build:prod": "tsc && vite build --base=/fission/ --outDir dist/prod",
1718
"build:dev": "tsc && vite build --base=/fission-closed/ --outDir dist/dev",
@@ -30,7 +31,7 @@
3031
"postinstall": "bun run lockfile:clean | bun x dev-null"
3132
},
3233
"dependencies": {
33-
"@biomejs/biome": "^2.2.0",
34+
"@biomejs/biome": "^2.5.6",
3435
"@haensl/google-analytics": "^1.2.2",
3536
"@mui/base": "^5.0.0-beta.70",
3637
"@mui/icons-material": "^5.18.0",
@@ -46,6 +47,7 @@
4647
"fuse.js": "^7.1.0",
4748
"jszip": "^3.10.1",
4849
"lygia": "^1.3.3",
50+
"meshoptimizer": "^1.2.0",
4951
"msw": "^2.10.5",
5052
"notistack": "^3.0.2",
5153
"peerjs": "^1.5.5",

fission/public/assetpack.zip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:061fafcd3d10472aa7bbb30258da152dc587ed90a6774715e0b9c51b9726c8e0
3-
size 47162091
2+
oid sha256:346732c52aeb501ca834604abd1e709b37739e411167f65966948c397c42b9b3
3+
size 41776228

0 commit comments

Comments
 (0)