Commit 97d94b9
committed
fix(workflow): track resolved isAdmin in prevIsAdminRef to prevent stale lock notification
When workspacePermissions loads asynchronously, prevCanAdminRef (which only
tracked effectivePermissions.canAdmin) would not detect the change, causing
the early-return guard to skip rebuilding the notification with the correct
unlock-button visibility. Track the same resolved value (workspacePermissions
?.viewer?.isAdmin ?? effectivePermissions.canAdmin) that is actually used to
build the notification.1 parent cc6c8c5 commit 97d94b9
1 file changed
Lines changed: 6 additions & 5 deletions
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
1254 | | - | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1255 | 1257 | | |
1256 | 1258 | | |
1257 | 1259 | | |
1258 | 1260 | | |
1259 | | - | |
1260 | | - | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1261 | 1264 | | |
1262 | 1265 | | |
1263 | 1266 | | |
| |||
1273 | 1276 | | |
1274 | 1277 | | |
1275 | 1278 | | |
1276 | | - | |
1277 | | - | |
1278 | 1279 | | |
1279 | 1280 | | |
1280 | 1281 | | |
| |||
0 commit comments