Commit 0ff8c7f
committed
refactor(chat): remove a needless alias and correct an eslint-disable reason
Self-audit for shortcuts, prompted by 'nothing hacky':
- handlePaste kept `const prepared = preparedSelection`, an alias added only to
avoid renaming two downstream lines. Uses the real name now.
- The home.tsx drain's eslint-disable claimed handleContextAdd is 'a stable body
function'. It is a body function, so it is a NEW value every render — the
justification was false. Replaced with the actual reason: it is omitted to keep
the drain one-shot, and doing so is harmless because consume() clears
atomically, so a re-run would find nothing.
Audited the rest of the diff for suppressions, casts and swallowed errors. The
three catch blocks are documented graceful degradations with explicit fallbacks
(row-drain failure, browsers rejecting a custom clipboard MIME mid-gesture,
malformed clipboard JSON); the one double cast is a DataTransfer stub in a test.1 parent 14b9ba6 commit 0ff8c7f
2 files changed
Lines changed: 7 additions & 4 deletions
File tree
- apps/sim/app/workspace/[workspaceId]/home
- components/user-input/components/prompt-editor
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
944 | 943 | | |
945 | 944 | | |
946 | 945 | | |
947 | | - | |
| 946 | + | |
948 | 947 | | |
949 | 948 | | |
950 | | - | |
| 949 | + | |
951 | 950 | | |
952 | 951 | | |
953 | 952 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
| |||
0 commit comments