Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@
## 2026-07-30 - Add window.confirm for destructive actions
**Learning:** Destructive actions like deleting groups and edge relationships previously occurred immediately without user confirmation.
**Action:** Always wrap delete operations with window.confirm() dialogs and ensure corresponding tests successfully mock window.confirm.
## 2026-08-25 - [Table Modal Action Context]
**Learning:** ๋ชจ๋‹ฌ ์ฐฝ ๋‚ด์˜ ์•ก์…˜ ๋ฒ„ํŠผ(์˜ˆ: '๋ณต์ œ', 'ํ…Œ์ด๋ธ” ์‚ญ์ œ')์ด ๋‹จ์ˆœํžˆ ๋™์ž‘ ์ด๋ฆ„๋งŒ ๊ฐ€์ง€๊ณ  ์žˆ์œผ๋ฉด, ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž๋Š” ์–ด๋–ค ๋Œ€์ƒ์„ ๋ณต์ œํ•˜๊ฑฐ๋‚˜ ์‚ญ์ œํ•˜๋Š”์ง€ ๋งฅ๋ฝ์„ ์žƒ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
**Action:** ํ˜„์žฌ ์„ ํƒ๋œ ์ปจํ…์ŠคํŠธ(์˜ˆ: ํ…Œ์ด๋ธ” ์ด๋ฆ„)๋ฅผ ํฌํ•จํ•˜๋Š” ๋ช…์‹œ์ ์ธ `aria-label`์„ ์•ก์…˜ ๋ฒ„ํŠผ์— ์ถ”๊ฐ€ํ•˜์—ฌ, ์‹œ๊ฐ์  ์ •๋ณด ์—†์ด๋„ ๋™์ž‘์˜ ๋Œ€์ƒ์„ ๋ช…ํ™•ํžˆ ์•Œ ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
4 changes: 3 additions & 1 deletion frontend/src/components/modals/EditTableModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ describe('EditTableModal', () => {
expect(screen.getByRole('textbox', { name: 'test_col ๋ฐ์ดํ„ฐ ํƒ€์ž…' })).toBeInTheDocument();
expect(screen.getByRole('checkbox', { name: 'test_col PK ์„ค์ •' })).toBeInTheDocument();
expect(screen.getByRole('checkbox', { name: 'test_col NN ์„ค์ •' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'test_table ํ…Œ์ด๋ธ” ์‚ญ์ œ' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'test_table ํ…Œ์ด๋ธ” ๋ณต์ œ' })).toBeInTheDocument();
});

it('returns null if not open or no editingNode', () => {
Expand Down Expand Up @@ -170,7 +172,7 @@ describe('EditTableModal', () => {
render(<EditTableModal {...defaultProps} editingNode={editingNode as any} setNodes={setNodesMock} onEditTableCancel={onEditTableCancelMock} />);

const user = userEvent.setup();
await user.click(screen.getByRole('button', { name: '๋ณต์ œ' }));
await user.click(screen.getByRole('button', { name: 'test_table ํ…Œ์ด๋ธ” ๋ณต์ œ' }));

expect(setNodesMock).toHaveBeenCalled();
expect(onEditTableCancelMock).toHaveBeenCalled();
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/modals/EditTableModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export function EditTableModal({
type="button"
onClick={onDeleteTable}
style={{ color: "#b91c1c", borderColor: "#fca5a5" }}
aria-label={`${editingNode.data.title} ํ…Œ์ด๋ธ” ์‚ญ์ œ`}
>
ํ…Œ์ด๋ธ” ์‚ญ์ œ
</button>
Expand Down Expand Up @@ -218,6 +219,7 @@ export function EditTableModal({
onEditTableCancel();
}}
style={{ color: "#034ea2", borderColor: "#93c5fd" }}
aria-label={`${editingNode.data.title} ํ…Œ์ด๋ธ” ๋ณต์ œ`}
>
๋ณต์ œ
</button>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/modals/ModalCoverage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ describe('modal behavior coverage', () => {
expect(deleteEditing(tableNode)?.data.columns).toHaveLength(1)

fireEvent.submit(document.getElementById('editTableForm')!)
fireEvent.click(screen.getByRole('button', { name: 'ํ…Œ์ด๋ธ” ์‚ญ์ œ' }))
fireEvent.click(screen.getByRole('button', { name: '๋ณต์ œ' }))
fireEvent.click(screen.getByRole('button', { name: 'public.users ํ…Œ์ด๋ธ” ์‚ญ์ œ' }))
fireEvent.click(screen.getByRole('button', { name: 'public.users ํ…Œ์ด๋ธ” ๋ณต์ œ' }))
const duplicate = setNodes.mock.calls[2]?.[0] as (nodes: Node<TableNodeData>[]) => Node<TableNodeData>[]
const duplicated = duplicate([tableNode])[1]!
expect(duplicated).toMatchObject({
Expand Down
Loading