Skip to content

Commit 0f025ee

Browse files
committed
Rm logging
1 parent 4409b45 commit 0f025ee

File tree

5 files changed

+129
-182
lines changed

5 files changed

+129
-182
lines changed

.github/workflows/push.yml

Lines changed: 69 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,15 @@ jobs:
5959
- name: Install deps
6060
run: pnpm install --frozen-lockfile
6161

62-
# TEMPORARY: Skip non-browser-test steps for faster iteration
63-
# - name: Check @jbrowse/core exports are up-to-date
64-
# run: |
65-
# node packages/core/scripts/generateExports.mjs
66-
# if ! git diff --quiet packages/core/package.json; then
67-
# echo "Error: @jbrowse/core exports are out of date!"
68-
# echo "Run 'node packages/core/scripts/generateExports.mjs' and commit the changes."
69-
# git diff packages/core/package.json
70-
# exit 1
71-
# fi
62+
- name: Check @jbrowse/core exports are up-to-date
63+
run: |
64+
node packages/core/scripts/generateExports.mjs
65+
if ! git diff --quiet packages/core/package.json; then
66+
echo "Error: @jbrowse/core exports are out of date!"
67+
echo "Run 'node packages/core/scripts/generateExports.mjs' and commit the changes."
68+
git diff packages/core/package.json
69+
exit 1
70+
fi
7271
7372
# Deploy jbrowse-web first
7473
- name: Validate branch/tag name for S3 path safety
@@ -97,21 +96,21 @@ jobs:
9796
aws s3 sync --delete --exclude="*.map" build s3://jbrowse.org/code/jb2/${{ github.ref_name }}
9897
aws cloudfront create-invalidation --distribution-id E13LGELJOT4GQO --paths "/code/jb2/${{ github.ref_name }}/*"
9998
100-
# TEMPORARY: Skip lint/typecheck/test for faster iteration on browser tests
101-
# - name: Check code formatting
102-
# run: pnpm prettier --check .
103-
# - name: Spellcheck
104-
# uses: crate-ci/typos@5c19779cb52ea50e151f5a10333ccd269227b5ae # v1.41.0
105-
# - name: Lint code
106-
# run: pnpm lint
107-
# - name: Typecheck code
108-
# run: pnpm typecheck
109-
# - name: Run tests
110-
# run: pnpm test-ci
111-
# - name: Pack artifacts for component tests
112-
# run: node --experimental-strip-types scripts/pack.ts
113-
# - name: Test build
114-
# run: BUILT_TESTS=1 pnpm built-test-ci
99+
# Lint, typecheck, test
100+
- name: Check code formatting
101+
run: pnpm prettier --check .
102+
- name: Spellcheck
103+
uses: crate-ci/typos@5c19779cb52ea50e151f5a10333ccd269227b5ae # v1.41.0
104+
- name: Lint code
105+
run: pnpm lint
106+
- name: Typecheck code
107+
run: pnpm typecheck
108+
- name: Run tests
109+
run: pnpm test-ci
110+
- name: Pack artifacts for component tests
111+
run: node --experimental-strip-types scripts/pack.ts
112+
- name: Test build
113+
run: BUILT_TESTS=1 pnpm built-test-ci
115114
- name: Run browser tests with Puppeteer
116115
id: browser-tests
117116
run: node --experimental-strip-types browser-tests/runner.ts
@@ -151,64 +150,62 @@ jobs:
151150
steps.browser-tests.outcome == 'failure' ||
152151
steps.auth-browser-tests.outcome == 'failure'
153152
run: exit 1
154-
155-
# TEMPORARY: Skip remaining steps for faster iteration on browser tests
156-
# - name: Test desktop app
157-
# run: pnpm test:e2e:ci
158-
# working-directory: products/jbrowse-desktop
153+
- name: Test desktop app
154+
run: pnpm test:e2e:ci
155+
working-directory: products/jbrowse-desktop
159156

160157
# Deploy storybooks
161-
# - name: Build LGV storybook
162-
# run: pnpm storybook:build
163-
# working-directory: products/jbrowse-react-linear-genome-view
158+
- name: Build LGV storybook
159+
run: pnpm storybook:build
160+
working-directory: products/jbrowse-react-linear-genome-view
164161

165-
# - name: Deploy LGV storybook
166-
# if:
167-
# github.ref == 'refs/heads/main' || startsWith(github.ref,
168-
# 'refs/tags/')
169-
# run: |
170-
# aws s3 sync --delete storybook-static s3://jbrowse.org/storybook/lgv/${{ github.ref_name }}
171-
# aws cloudfront create-invalidation --distribution-id E13LGELJOT4GQO --paths "/storybook/lgv/${{ github.ref_name }}/*"
172-
# working-directory: products/jbrowse-react-linear-genome-view
162+
- name: Deploy LGV storybook
163+
if:
164+
github.ref == 'refs/heads/main' || startsWith(github.ref,
165+
'refs/tags/')
166+
run: |
167+
aws s3 sync --delete storybook-static s3://jbrowse.org/storybook/lgv/${{ github.ref_name }}
168+
aws cloudfront create-invalidation --distribution-id E13LGELJOT4GQO --paths "/storybook/lgv/${{ github.ref_name }}/*"
169+
working-directory: products/jbrowse-react-linear-genome-view
173170

174-
# - name: Build React App storybook
175-
# run: pnpm storybook:build
176-
# working-directory: products/jbrowse-react-app
171+
- name: Build React App storybook
172+
run: pnpm storybook:build
173+
working-directory: products/jbrowse-react-app
177174

178-
# - name: Deploy React App storybook
179-
# if:
180-
# github.ref == 'refs/heads/main' || startsWith(github.ref,
181-
# 'refs/tags/')
182-
# run: |
183-
# aws s3 sync --delete storybook-static s3://jbrowse.org/storybook/app/${{ github.ref_name }}
184-
# aws cloudfront create-invalidation --distribution-id E13LGELJOT4GQO --paths "/storybook/app/${{ github.ref_name }}/*"
185-
# working-directory: products/jbrowse-react-app
175+
- name: Deploy React App storybook
176+
if:
177+
github.ref == 'refs/heads/main' || startsWith(github.ref,
178+
'refs/tags/')
179+
run: |
180+
aws s3 sync --delete storybook-static s3://jbrowse.org/storybook/app/${{ github.ref_name }}
181+
aws cloudfront create-invalidation --distribution-id E13LGELJOT4GQO --paths "/storybook/app/${{ github.ref_name }}/*"
182+
working-directory: products/jbrowse-react-app
186183

187-
# - name: Build CGV storybook
188-
# run: pnpm storybook:build
189-
# working-directory: products/jbrowse-react-circular-genome-view
184+
- name: Build CGV storybook
185+
run: pnpm storybook:build
186+
working-directory: products/jbrowse-react-circular-genome-view
190187

191-
# - name: Deploy CGV storybook
192-
# if:
193-
# github.ref == 'refs/heads/main' || startsWith(github.ref,
194-
# 'refs/tags/')
195-
# run: |
196-
# aws s3 sync --delete storybook-static s3://jbrowse.org/storybook/cgv/${{ github.ref_name }}
197-
# aws cloudfront create-invalidation --distribution-id E13LGELJOT4GQO --paths "/storybook/cgv/${{ github.ref_name }}/*"
198-
# working-directory: products/jbrowse-react-circular-genome-view
188+
- name: Deploy CGV storybook
189+
if:
190+
github.ref == 'refs/heads/main' || startsWith(github.ref,
191+
'refs/tags/')
192+
run: |
193+
aws s3 sync --delete storybook-static s3://jbrowse.org/storybook/cgv/${{ github.ref_name }}
194+
aws cloudfront create-invalidation --distribution-id E13LGELJOT4GQO --paths "/storybook/cgv/${{ github.ref_name }}/*"
195+
working-directory: products/jbrowse-react-circular-genome-view
199196

200-
# - name: Upload packed artifacts for component tests
201-
# uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
202-
# with:
203-
# name: packed-artifacts
204-
# path: component_tests/*/packed/
205-
# retention-days: 1
197+
- name: Upload packed artifacts for component tests
198+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
199+
with:
200+
name: packed-artifacts
201+
path: component_tests/*/packed/
202+
retention-days: 1
206203

207-
# TEMPORARY: Skip buildwebsite job for faster iteration
204+
# Conditionally run the buildwebsite job
208205
buildwebsite:
209206
name: Build website
210207
needs: check_commit_message
211-
if: false # needs.check_commit_message.outputs.skip_jobs != 'true'
208+
if: needs.check_commit_message.outputs.skip_jobs != 'true'
212209
runs-on: ubuntu-latest
213210
steps:
214211
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -236,7 +233,6 @@ jobs:
236233
with:
237234
args: website/testing/ --check-anchors
238235

239-
# TEMPORARY: Skip component_tests for faster iteration
240236
# Separate job for component_tests with no permissions.
241237
# These tests install npm packages without a yarn.lock, so untrusted
242238
# dependencies could potentially run malicious code. By isolating this
@@ -246,7 +242,7 @@ jobs:
246242
component_tests:
247243
name: Test embedded components
248244
needs: [check_commit_message, main]
249-
if: false # needs.check_commit_message.outputs.skip_jobs != 'true'
245+
if: needs.check_commit_message.outputs.skip_jobs != 'true'
250246
runs-on: ubuntu-latest
251247
permissions: {}
252248
steps:

packages/app-core/src/ui/App/JBrowseViewPanel.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,11 @@ const JBrowseViewPanel = observer(function JBrowseViewPanel({
4444
const { classes } = useStyles()
4545

4646
if (!session) {
47-
console.log(
48-
'[TiledViewsContainer] JBrowseViewPanel: no session',
49-
JSON.stringify({ panelId }),
50-
)
5147
return <div className={classes.container}>Loading...</div>
5248
}
5349

5450
const views = getViewsForPanel(panelId, session)
5551

56-
console.log(
57-
'[TiledViewsContainer] JBrowseViewPanel render',
58-
JSON.stringify({ panelId, viewCount: views.length, viewIds: views.map(v => v.id) }),
59-
)
60-
6152
if (views.length === 0) {
6253
return (
6354
<div className={classes.container}>

packages/app-core/src/ui/App/TiledViewsContainer.tsx

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,6 @@ const TiledViewsContainer = observer(function TiledViewsContainer({
160160
const session = sessionRef.current
161161
const pendingAction = peekPendingMoveAction()
162162

163-
console.log(
164-
'[TiledViewsContainer] createInitialPanels called',
165-
JSON.stringify({
166-
pendingAction,
167-
viewCount: session.views.length,
168-
viewIds: session.views.map(v => v.id),
169-
}),
170-
)
171-
172163
// Check if there's init configuration from URL params
173164
const initLayout = isSessionWithDockviewLayout(session)
174165
? session.init
@@ -311,11 +302,6 @@ const TiledViewsContainer = observer(function TiledViewsContainer({
311302
.map(v => v.id)
312303
.filter(id => id !== pendingViewId)
313304

314-
console.log(
315-
'[TiledViewsContainer] Processing pending action',
316-
JSON.stringify({ type, pendingViewId, otherViewIds }),
317-
)
318-
319305
// Create first panel for existing views (excluding the pending view)
320306
// Only create if there are other views to put in it
321307
if (otherViewIds.length > 0) {
@@ -340,24 +326,11 @@ const TiledViewsContainer = observer(function TiledViewsContainer({
340326

341327
// Only clear the pending action after successful setup
342328
clearPendingMoveAction()
343-
344-
console.log(
345-
'[TiledViewsContainer] Pending action handled',
346-
JSON.stringify({
347-
panelCount: dockviewApi.panels.length,
348-
panelIds: dockviewApi.panels.map(p => p.id),
349-
}),
350-
)
351329
} else {
352330
// Normal case: create single initial panel
353331
const panelId = `panel-${createElementId()}`
354332
dockviewApi.addPanel(createPanelConfig(panelId, session))
355333

356-
console.log(
357-
'[TiledViewsContainer] Normal case - created single panel',
358-
JSON.stringify({ panelId, panelCount: dockviewApi.panels.length }),
359-
)
360-
361334
if (isSessionWithDockviewLayout(session)) {
362335
session.setActivePanelId(panelId)
363336
}
@@ -409,15 +382,6 @@ const TiledViewsContainer = observer(function TiledViewsContainer({
409382
: null
410383
const savedLayout = !hasPendingAction && dockviewSession?.dockviewLayout
411384

412-
console.log(
413-
'[TiledViewsContainer] onReady called',
414-
JSON.stringify({
415-
hasPendingAction,
416-
hasSavedLayout: !!savedLayout,
417-
viewCount: sessionRef.current.views.length,
418-
}),
419-
)
420-
421385
if (savedLayout) {
422386
try {
423387
rearrangingRef.current = true
@@ -432,13 +396,6 @@ const TiledViewsContainer = observer(function TiledViewsContainer({
432396
if (event.api.panels.length === 0) {
433397
throw new Error('No panels after fromJSON restore')
434398
}
435-
console.log(
436-
'[TiledViewsContainer] Restored from savedLayout',
437-
JSON.stringify({
438-
panelCount: event.api.panels.length,
439-
panelIds: event.api.panels.map(p => p.id),
440-
}),
441-
)
442399
} catch (e) {
443400
console.error('Failed to restore dockview layout:', e)
444401
createInitialPanels(event.api)

products/jbrowse-web/browser-tests/runner.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,12 @@ const testSuites: TestSuite[] = [
347347
})
348348

349349
// Wait for location search input (view is fully rendered)
350-
await page.waitForSelector('input[placeholder="Search for location"]', {
351-
timeout: 10000,
352-
})
350+
await page.waitForSelector(
351+
'input[placeholder="Search for location"]',
352+
{
353+
timeout: 10000,
354+
},
355+
)
353356

354357
await waitForLoadingToComplete(page)
355358

@@ -942,10 +945,7 @@ async function main() {
942945
const page = await browser.newPage()
943946
page.on('console', msg => {
944947
const text = msg.text()
945-
// Print debug logs from TiledViewsContainer
946-
if (text.includes('[TiledViewsContainer]')) {
947-
console.log(' Browser:', text)
948-
} else if (msg.type() === 'error' && !text.includes('favicon')) {
948+
if (msg.type() === 'error' && !text.includes('favicon')) {
949949
console.error(' Browser:', text)
950950
}
951951
})

0 commit comments

Comments
 (0)