Commit 32e371c
fix(webapp): use useFetcher for env var edits to preserve scroll/toggle state
Replaces `redirectDocument` with `useFetcher` for editing environment
variables. This allows background form submission without full page
reload, which preserves:
- Scroll position in the env vars list
- "Reveal values" toggle state
- Search filter state
Changes:
- EditEnvironmentVariablePanel now uses `useFetcher` instead of `Form`
- Action returns `json({ success: true })` instead of `redirectDocument`
- Dialog auto-closes on successful submission via useEffect
- Form ID is now unique per variable to prevent conflicts
Fixes #2845
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Eric Allam <[email protected]>1 parent 7c2e78c commit 32e371c
File tree
1 file changed
+16
-25
lines changed- apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables
1 file changed
+16
-25
lines changedLines changed: 16 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 161 | + | |
175 | 162 | | |
176 | 163 | | |
177 | 164 | | |
| |||
417 | 404 | | |
418 | 405 | | |
419 | 406 | | |
420 | | - | |
421 | | - | |
| 407 | + | |
| 408 | + | |
422 | 409 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
427 | 418 | | |
428 | 419 | | |
429 | | - | |
| 420 | + | |
430 | 421 | | |
431 | 422 | | |
432 | 423 | | |
| |||
444 | 435 | | |
445 | 436 | | |
446 | 437 | | |
447 | | - | |
| 438 | + | |
448 | 439 | | |
449 | 440 | | |
450 | 441 | | |
| |||
490 | 481 | | |
491 | 482 | | |
492 | 483 | | |
493 | | - | |
| 484 | + | |
494 | 485 | | |
495 | 486 | | |
496 | 487 | | |
| |||
0 commit comments