Repository navigation
Foreign key UI improvement PR #3 - #188
Conversation
Fermionic-Lyu
left a comment
There was a problem hiding this comment.
A few improvements:
-
In RecordForm, for a uuid field with foreign key, the placeholder should not be 'Auto-genereated if empty'. This is mentioned in issues #174. Actually only a custom column with type uuid and default value gen_random_uuid() should display the 'Auto generated if empty' placeholder.
-
You can remove the id column in RecordForm. We should not let user input that.
-
When user clicks 'Open Table' in ForeignKeyCell, after navigation, you should clear the selected cell (or even better, the selected cell should be changed to the cell that is linked to, but that is optional for now)
-
Double check row height with HH and Peter. 36px looks worse than the original 52px to me, but I'm good with it if both of them agree with the change
I solved the comments #1 and #2. However, I still have trouble with the selected cell for now, since it is handled in the data grid. video1653244025.mp4 |
|
In your video, test3 & test4 are still showing a placeholder "Auto-generated if empty". Do these two fields have default value gen_random_uuid()? What about a uuid column with no default value? |
The placeholder in test3 is incorrect. It should be Optional, and I fixed it. Then I saw that if the user creates a non-nullable UUID column, even without setting a default value, the current logic will change the default value to gen_random_uuid(), which leads to the "auto-generated" placeholder. |
implement a more solid default value displayer in the furture
Fermionic-Lyu
left a comment
There was a problem hiding this comment.
I removed uuid placeholder logic to align with other column types. We should implement a new logic for displaying correct default values as placeholders in the future.
Make a note of all the unresolved comments and fix them in the next PR
The next PR is mainly about assigning and displaying the default value. I'm working on that now. |
* chore(deps): vitest 4.1.11, nodemailer 9.1.1, js-yaml 4.3.2
Clears 7 of the 11 open Dependabot alerts on this repo. The remaining 4 are
covered below with reasons, not left silent.
vitest ^4.1.8 / ^4.1.6 -> ^4.1.11 in backend, packages/ui and
packages/dashboard (each declares its own) 2 alerts, dev
@vitest/mocker lifts to 4.1.11 with vitest
nodemailer ^9.0.3 -> ^9.1.1 4 alerts, runtime
js-yaml override 5.2.3 -> ^4.3.2 1 alert, dev, HIGH
nodemailer is NOT the 6.x -> 9.x major the alert ranges imply -- the repo is
already on 9.0.3, so this is a patch bump. Note 9.1.1 rather than 9.1.0: alert
#192 covers "<= 9.1.0", so 9.1.0 would still be flagged.
js-yaml is the interesting one. The root override pinned 5.2.3, but every
consumer wants ^4.1.x (@eslint/eslintrc, cosmiconfig, csv-to-pg), so a 5.x pin
could not apply to them and the root copy sat on the vulnerable 4.3.1 while the
override looked like it had handled it. ^4.3.2 is the patched release in the
line they actually resolve, so the override now does what it claims.
NOT FIXED, and not fixable:
adm-zip #188 GHSA-vwc7-r8mq-g2x9, ">= 0.5.9, <= 0.6.0", first_patched_version
NONE. 0.6.0 is the latest published version, so there is no
upstream fix to take. Needs a risk acceptance or a replacement
dependency, not a bump.
NOT FIXED, deliberately, both unchanged from #2048:
qs #182/#183 express@4 -> [email protected] pins qs@~6.15.1 and the patch
is 6.16.0, outside it. Needs an express 5 major.
csv-parse #187 dev-only, via pgsql-seed -> [email protected] -> csv-parse ^6.2.1.
pg-seed@latest still requires ^6.2.1, so there is no upstream
fix. The runtime path is already on 7.0.2.
Lock regenerated with npm 11 (`npx npm@11 install --package-lock-only`): npm
10.9.4 fails on this repo with `Cannot read properties of null (reading
'edgesOut')`, which reproduces on clean main with the lock deleted and is not
caused by this change. lockfileVersion stays 3 and `npm ci` under npm 10
installs it cleanly.
Verified: `npm ci` clean; `npm run typecheck` 8/8 turbo tasks; backend suite
203 files / 2,425 tests passed, 21 skipped. First run showed 1 failure that
did not reproduce on re-run -- flake, not this change.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015uMMufpCJ4VqNeavrDHJim
* fix(deps): regenerate the js-yaml subtree so no stale edge survives
Greptile's P2 is correct, and I had noticed this and waved it off, which was
wrong. After the override moved from 5.2.3 to ^4.3.2, the lockfile still pinned
`node_modules/@eslint/eslintrc/node_modules/js-yaml` at 5.2.3 -- a version that
satisfies NEITHER the new override NOR @eslint/eslintrc's own ^4.1.1. A
lock-based install and a fresh resolve would therefore have produced different
trees.
Not a security issue: 5.2.3 sits above the vulnerable `>=4.0.0 <4.3.2` range.
It is a lockfile correctness issue, which is worth fixing on its own terms.
Dropped the stale node and re-resolved. There is now exactly ONE js-yaml, at
4.3.2, satisfying both the override and eslintrc.
Verified: `npm ci` clean; `npm ls js-yaml --all` reports 4.3.2 as `overridden`
and `deduped` with NO `invalid` nodes; `npm run typecheck` 8/8 turbo tasks.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015uMMufpCJ4VqNeavrDHJim
---------
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>





video1984424314.mp4