Skip to content

Commit 70284e3

Browse files
fix copilot comments
1 parent 97a8568 commit 70284e3

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

.github/copilot-instructions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,4 @@ npm run unused # Find unused code
201201

202202
- `REACT_APP_BACKEND` - Backend URL for single-cluster mode
203203
- `REACT_APP_META_BACKEND` - Meta backend URL for multi-cluster mode
204-
- `PUBLIC_URL` - Base URL for static assets (use `.` for relative paths)
205204
- `GENERATE_SOURCEMAP` - Set to `false` for production builds

AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ Build artifacts are placed in `/build` directory. For embedded deployments, file
321321

322322
- `REACT_APP_BACKEND` - Backend URL for single-cluster mode
323323
- `REACT_APP_META_BACKEND` - Meta backend URL for multi-cluster mode
324-
- `PUBLIC_URL` - Base URL for static assets (use `.` for relative paths)
325324
- `GENERATE_SOURCEMAP` - Set to `false` for production builds
326325

327326
## Common Issues & Troubleshooting

CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ Build artifacts are placed in `/build` directory. For embedded deployments, file
321321

322322
- `REACT_APP_BACKEND` - Backend URL for single-cluster mode
323323
- `REACT_APP_META_BACKEND` - Meta backend URL for multi-cluster mode
324-
- `PUBLIC_URL` - Base URL for static assets (use `.` for relative paths)
325324
- `GENERATE_SOURCEMAP` - Set to `false` for production builds
326325

327326
## Common Issues & Troubleshooting

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"dev": "DISABLE_ESLINT_PLUGIN=true TSC_COMPILE_ON_ERROR=true REACT_APP_BACKEND=http://localhost:8765 REACT_APP_META_BACKEND=undefined rsbuild dev",
6969
"build": "rm -rf build && DISABLE_ESLINT_PLUGIN=true CI=true rsbuild build",
7070
"build:embedded": "GENERATE_SOURCEMAP=false REACT_APP_BACKEND=http://localhost:8765 REACT_APP_META_BACKEND=undefined npm run build",
71-
"build:embedded-mc": "GENERATE_SOURCEMAP=false PUBLIC_URL=. REACT_APP_BACKEND= REACT_APP_META_BACKEND= npm run build",
71+
"build:embedded-mc": "GENERATE_SOURCEMAP=false REACT_APP_BACKEND= REACT_APP_META_BACKEND= npm run build",
7272
"build:embedded:archive": "npm run build:embedded && mv build embedded-ui && cp CHANGELOG.md embedded-ui/CHANGELOG.md && zip -r embedded-ui.zip embedded-ui && rm -rf embedded-ui",
7373
"lint": "run-p lint:*",
7474
"lint:js": "eslint .",

public/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
<title>YDB Monitoring</title>
2525
<script>
2626
window.systemSettings = {};
27-
window.web_version = "<%= !process.env.REACT_APP_BACKEND %>"
28-
window.custom_backend = "<%= process.env.NODE_ENV === 'development' && process.env.REACT_APP_BACKEND %>"
29-
window.meta_backend = "<%= process.env.REACT_APP_META_BACKEND %>"
30-
window.react_app_disable_checks = "<%= process.env.REACT_APP_DISABLE_CHECKS %>"
27+
window.web_version = "<%= !process.env.REACT_APP_BACKEND %>";
28+
window.custom_backend = "<%= process.env.NODE_ENV === 'development' && process.env.REACT_APP_BACKEND %>";
29+
window.meta_backend = "<%= process.env.REACT_APP_META_BACKEND %>";
30+
window.react_app_disable_checks = "<%= process.env.REACT_APP_DISABLE_CHECKS %>";
3131
</script>
3232
</head>
3333

rsbuild.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ const APP_VARS = [
1313
'TSC_COMPILE_ON_ERROR',
1414
'REACT_APP_DISABLE_CHECKS',
1515

16+
'NODE_ENV',
17+
1618
// Backend configuration
1719
'REACT_APP_BACKEND',
1820
'REACT_APP_META_BACKEND',
@@ -78,6 +80,9 @@ export default defineConfig({
7880
root: './build',
7981
},
8082
assetPrefix: '.',
83+
sourceMap: {
84+
js: process.env.GENERATE_SOURCEMAP !== 'false' ? 'source-map' : false,
85+
},
8186
},
8287
html: {
8388
template: './public/index.html',

src/store/__test__/getUrlData.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe('getUrlData', () => {
111111
});
112112
});
113113
describe('single-cluster version with custom backend', () => {
114-
test('should parse correclty parse pathname', () => {
114+
test('should correctly parse pathname', () => {
115115
window.history.pushState({}, '', '/cluster');
116116

117117
const result = getUrlData({

0 commit comments

Comments
 (0)