가져오기 흐름
원본 다운로드 ↓CRM-142 범위 한정 설계
붙여 넣은 가상 티켓에 대한 설계 제안이며 다음에도 저장되어 있습니다: tickets/CRM-142.md. Jira 조회/수정, 이해관계자 인터뷰 또는 설계 승인은 없었습니다. 저자는 되돌릴 수 있는 선택을 위임하고 계획만 요청했습니다.
기존 흐름 및 의도
index.html 파일은 Contacts, Search contacts, 연락처 목록 및 펼칠 수 있는 Add contact를 표시합니다. src/app.js 파일은 연락처를 한 번 읽고 searchContacts로 필터링하며 텍스트 노드를 렌더링합니다. saveContacts가 완료된 후에만 메모리 행을 교체합니다. 이 흐름을 유지하면서 고객 성공 사용자가 반복 수동 입력을 로컬 CSV 검토로 바꿀 수 있게 하세요.
접근 방식
| 방식 | 장점 | 비용 |
|---|---|---|
| Contacts의 인라인 가져오기 패널 | 현재 페이지, 상태 및 목록을 재사용하며 경로나 대화상자 추가 없음 | 긴 미리보기가 목록을 아래로 밀어냄 |
| 같은 페이지의 별도 검토 화면 | 더 넓은 검토 공간 | 추가 화면 상태, 숨겨진 목록 및 돌아가기/포커스 처리 필요 |
저자의 선택: 검색 위 인라인 패널과 비어 있지 않은 레코드별 카드 하나. 이 작은 기존 CRM에는 더 단순한 방식입니다. 모달, 페이지 분할, 편집 가능한 셀 또는 필드 매핑은 없습니다. 잘못된 데이터는 원본 파일에서 수정하고 다시 선택하세요.
흐름
기존 목록 → Import contacts → 레이블이 있는 CSV 파일 선택 → Review CSV → 개수와 모든 레코드 → Import ready contacts → 저장 성공 → 패널 닫기, 검색 지우기, 추가/건너뜀 요약과 기존 목록 표시. 검토 중에도 Search와 Add contact를 사용할 수 있으며 확인 시 현재 연락처를 다시 검증합니다. 저장 중에는 데이터를 변경하는 컨트롤을 비활성화하세요.
Cancel import 또는 Back to contacts는 저장 없이 파일, 오류 및 미리보기를 버리고 Import contacts로 포커스를 돌립니다. 잘못되거나 너무 큰 파일에는 유용한 오류를 표시하고 가져올 수 있는 미리보기는 표시하지 않습니다. 새 선택은 이전 미리보기와 오류를 지웁니다. 저장 실패 시 검토를 유지하고 실패를 알린 뒤 같은 확인 버튼으로 재시도할 수 있게 합니다. 어댑터가 완료된 후에만 성공을 알립니다.
경계 및 저자의 결정
나중에 다음에만 구현합니다: index.html, style.css, src/app.js, 새 파일 src/import.js. 유지할 항목: src/contacts.js, src/storage.js, 테스트, 예시, 티켓, 서버 및 패키지. 의존성, 원격 업로드, 계정, 데이터베이스, 로그인, 백그라운드 작업 또는 사이트 개편은 추가하지 않습니다. 기존 네임스페이스 localStorage만 영속 저장소로 사용합니다.
적용할 계약: docs/import-contract.md: 100,000 UTF-8 바이트, 비어 있지 않은 데이터 레코드 500개, 정규화한 헤더 및 순수 미리보기/병합. 서로 다른 미지의 헤더 열은 허용하지만 값은 무시합니다. 헤더 너비를 넘는 행 필드는 거부합니다. 끝의 누락된 셀은 빈 문자열로 채워 필드 검증을 거칩니다. 비어 있다는 것은 파싱한 모든 셀이 공백뿐이라는 뜻입니다. 빈 레코드를 제외하고 1,부터 논리 데이터 레코드 번호를 표시합니다. 따옴표 안 줄바꿈은 새 레코드를 만들지 않습니다. 이는 저자의 선택입니다.
계획에 남은 미해결 제품 결정은 없습니다. 운영자는 구현 전에 이 선택을 검토할 수 있습니다. 참고: docs/screen-design.md, docs/architecture.md 및 docs/implementation-plan.md.
원본 파일 및 출처 세부 정보
output/docs/brainstorming.md.txt · SHA-256 5b32b6e1beddb07edce67d1c86ff9fbb2e94c0b106899177367b74e953331796
# CRM-142 bounded design
Design proposal for the pasted fictional ticket, also stored in `tickets/CRM-142.md`. No Jira fetch/update, stakeholder interview or design approval occurred. The author delegated reversible choices and requested planning only.
## Existing flow and intent
`index.html` presents Contacts, Search contacts, the contact list and expandable Add contact. `src/app.js` reads contacts once, filters through searchContacts, renders text nodes and awaits saveContacts before replacing its in-memory rows. Help customer-success users replace repeated manual entry with a local CSV review while retaining that flow.
## Approaches
| Approach | Benefit | Cost |
| --- | --- | --- |
| Inline import panel on Contacts | Reuses current page, status and list; no route or dialog | Long previews push the list down |
| Separate review view on the same page | More room for review | Extra view state, hidden list and return/focus handling |
Author choice: inline panel above search, with a card per nonblank record. It is the simpler fit for this small existing CRM. No modal, pagination, editable cells or field mapping. Correct invalid data in the source file and select it again.
## Flow
Existing list → Import contacts → labelled CSV file selection → Review CSV → counts and every record → Import ready contacts → successful save → close panel, clear search and show the existing list with added/skipped summary. Search and Add contact remain available during review; confirmation rechecks current contacts. Disable mutating controls during a save.
Cancel import or Back to contacts discards the file, errors and preview without saving; return focus to Import contacts. Malformed/oversized files show a useful error and no importable preview. A new selection clears previous preview/errors. A failed save keeps the review, reports failure, and enables the same confirmation for retry. Success is announced only after the adapter resolves.
## Boundaries and author calls
Implement later only in `index.html`, `style.css`, `src/app.js`, new `src/import.js`. Preserve `src/contacts.js`, `src/storage.js`, tests, samples, ticket, server and package. No dependencies, remote uploads, accounts, database, login, background jobs or site refresh. Existing namespaced localStorage is the only persistence.
Apply `docs/import-contract.md`: 100,000 UTF-8 bytes, 500 nonblank data records, normalized headers and pure preview/merge. Accept unknown distinct header columns but ignore their values; reject row fields beyond header width. Missing trailing cells become empty strings and undergo field validation. Blank means all parsed cells are whitespace-only. Display logical data record numbers starting at 1, ignoring blank records; quoted newlines do not create new records. These are author choices.
No unresolved product decision remains for planning; the operator can review these choices before any implementation. See `docs/screen-design.md`, `docs/architecture.md` and `docs/implementation-plan.md`.