-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/#57 - Sidebar 프로젝트 CRUD 기능 연결 및 메뉴 카테고리에 따른 Content 화면 연결 #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dlguszoo
wants to merge
13
commits into
develop
Choose a base branch
from
feature/#57
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f372b30
[#57] feat: ProjectItem VO, SidebarError, SidebarClient 인터페이스 추가
dlguszoo 2fce61a
[#57] feat: SidebarFeature CRUD 연결 및 LoadingState 기반 상태 관리
dlguszoo d46511f
[#57] feat: MainFeature Sidebar delegate 처리 및 SelectSecretType 2-colu…
dlguszoo 15b3a1e
[#57] feat: CreateProject/AddToProject를 SidebarClient 기반으로 전환
dlguszoo cceae6c
[#57] feat: DVProjectRenameContainer 인라인 리네임 컴포넌트 추가
dlguszoo 2998bfc
[#57] feat: Composition Root — LiveStorage, SidebarClient+Live, Setti…
dlguszoo c4b12a8
[#57] test: SidebarFeature/MainFeature/CreateProjectFeature 단위 테스트 추가
dlguszoo 5f627e0
[#57] fix: 주석 정리
dlguszoo 4f9aedd
[#57] fix: P2 코드리뷰 수정
dlguszoo bcb45c0
[#57] fix: P0 코드리뷰 수정
dlguszoo 73842e9
[#57] fix: P1 코드리뷰 수정
dlguszoo e1cf345
[#57] fix: rename 빈 이름 처리 및 dead code 제거
dlguszoo c4931c7
[#57] fix: 동일 모듈 내부 상수로 public 제거
dlguszoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
Projects/DVDesign/Sources/Components/DVProjectRenameContainer.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| // Copyright © 2026 Devault. All rights reserved | ||
|
|
||
| import SwiftUI | ||
|
|
||
| /// 프로젝트 행 인라인 리네임 컴포넌트. | ||
| /// DVProjectContainer와 동일한 leading icon + 레이아웃에서 이름 부분을 TextField로 교체한다. | ||
| public struct DVProjectRenameContainer: View { | ||
|
|
||
| // MARK: - Properties | ||
|
|
||
| @Binding public var text: String | ||
| public var onSubmit: () -> Void | ||
| public var onCancel: () -> Void | ||
|
|
||
| @FocusState private var isFocused: Bool | ||
| @State private var isHandled = false | ||
|
|
||
| // MARK: - Init | ||
|
|
||
| public init( | ||
| text: Binding<String>, | ||
| onSubmit: @escaping () -> Void, | ||
| onCancel: @escaping () -> Void | ||
| ) { | ||
| self._text = text | ||
| self.onSubmit = onSubmit | ||
| self.onCancel = onCancel | ||
| } | ||
|
|
||
| // MARK: - Body | ||
|
|
||
| public var body: some View { | ||
| HStack(spacing: 4) { | ||
| Image(systemName: DVProjectContainer.projectIconSystemName) | ||
| .dvFont(.captionLG) | ||
| .foregroundStyle(Color.dv(.gray900)) | ||
| TextField("", text: $text) | ||
| .dvFont(.bodyMD) | ||
| .textFieldStyle(.plain) | ||
| .focused($isFocused) | ||
| .onSubmit { | ||
| isHandled = true | ||
| onSubmit() | ||
| } | ||
| .onExitCommand { | ||
| isHandled = true | ||
| onCancel() | ||
| } | ||
| } | ||
| .padding(2) | ||
| .frame(minWidth: 120, alignment: .leading) | ||
| .onAppear { isFocused = true } | ||
| .onChange(of: isFocused) { _, focused in | ||
| guard !focused, !isHandled else { return } | ||
| onSubmit() | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
Projects/DVPresentation/Sources/Dependencies/SidebarClient.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // Copyright © 2026 Devault. All rights reserved | ||
|
|
||
| import ComposableArchitecture | ||
| import Foundation | ||
|
|
||
| @DependencyClient | ||
| public struct SidebarClient: Sendable { | ||
| public var fetchProjects: @Sendable () async throws -> [ProjectItem] | ||
| public var createProject: @Sendable (_ name: String) async throws -> ProjectItem | ||
| public var renameProject: @Sendable (_ id: ProjectItem.ID, _ name: String) async throws -> ProjectItem | ||
| public var deleteProject: @Sendable (_ id: ProjectItem.ID) async throws -> Void | ||
| } | ||
|
|
||
| extension SidebarClient: TestDependencyKey { | ||
| public static let testValue = SidebarClient() | ||
|
|
||
| public static let previewValue = SidebarClient( | ||
| fetchProjects: { ProjectItem.previews }, | ||
| createProject: { name in ProjectItem(id: UUID(), name: name) }, | ||
| renameProject: { id, name in ProjectItem(id: id, name: name) }, | ||
| deleteProject: { _ in } | ||
| ) | ||
| } | ||
|
|
||
| extension DependencyValues { | ||
| public var sidebarClient: SidebarClient { | ||
| get { self[SidebarClient.self] } | ||
| set { self[SidebarClient.self] = newValue } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
초기 목록 요청과 생성 결과의 순서를 보장하세요.
로딩 중 생성한 뒤 기존
fetchProjects()응답이 늦게 도착하면, 여기서 추가한 항목을 오래된 목록으로 덮어쓸 수 있습니다. 새 프로젝트가 메뉴에서 사라지고 선택 ID만 남습니다. 생성 후 목록 요청을 직렬화·취소하거나 요청 세대로 오래된 응답을 무시하세요.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추후 AddToProject 담당 팀원의 TODO로 남겨둘 것.
-> 수동 append가 아닌 refetch 패턴으로
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
댓글 이미지들은 다크 테마의 macOS 앱 사이드바 UI를 보여줍니다. 첫 번째는 프로젝트 목록이 보이는 상태에서 중앙에 경고 아이콘, “목록을 불러오지 못했어요”, **“Retry”**가 표시됩니다. 두 번째는 프로젝트 “가나” 행이 파란색으로 선택되고 인라인 이름 편집 필드가 열린 모습입니다. 세 번째는 API Keys/Token, OAuth, Database, SSH & Credentials, EnvSet, Etc 카테고리 타일이 표시됩니다. 네 번째는 “Create Project” 모달과
Project Name,e.g DeVault, Cancel/Create 버튼을, 다섯 번째는 “'가나' 프로젝트를 삭제할까요?” 확인 모달과 취소/삭제 버튼을 보여줍니다.@dlguszoo, 확인했습니다. 이 건은 현재 PR 범위에서는 보류하겠습니다.후속 작업에서는 생성 결과를 수동
append하지 않고, 생성 성공 후 프로젝트 목록을 refetch하는 흐름으로 전환하는 것이 적절합니다. 이때 최초 fetch가 늦게 완료되어 최신 목록을 덮어쓰지 않도록, 기존 요청 취소 또는 요청 세대(generation) 관리도 함께 처리해야 합니다.원하시면 AddToProject 담당자용 GitHub 후속 이슈로 등록하겠습니다.
✏️ Learnings added