fix: 스마트 vault 파일 탐색 알고리즘 도입 및 사이드 패널 파일 링크 404 차단 - #249
Open
byoungholee0821 wants to merge 2 commits into
Open
Conversation
- layout/page: 회사 뷰 전반에서 전역 워크스페이스 사이드 패널 노출 및 드래그 핸들 리사이즈 지원 - workspace-panel: 파일 패널 내 Markdown 및 Office 문서 미리보기 서빙 - codex/connect: Codex 크루 연동 브릿지 및 회사 MCP 활성화
- hub: readDoc에 5단계 스마트 자동 탐색 (경로 정제 -> projects/notes 접두사 자동 보정 -> vault 재귀 파일명 탐색 -> 일지 보관함) 적용 - files API: projects/ 접두사가 생략된 파일 서빙 요청 자동 보정 - page/ui: 전역 사이드 패널(PR#1)과 연동하여 채팅 답변 속 절대/상대 파일 링크 클릭 시 404 차단 및 워크스페이스 패널 열기 - vault-links: rewriteVaultHref 절대 경로 및 /vault/ 경계 정제 보강 - tools/runners: read_file 도구 출력에 size 필드 추가 및 onToolResult 콜백 보강 - test: 스마트 readDoc 6개 예외 케이스 및 단위 테스트 작성 (pass 5) - docs: 크루 파일 접근 이슈 및 파일 링크 404 원인 분석 보고서 추가 (004, 005, 008)
byoungholee0821
force-pushed
the
pr/04-smart-file-search-link-fix
branch
from
August 13, 2026 00:08
b5c18f3 to
41b671e
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📌 기능 및 이슈 개요
크루가 채팅 답변 속 파일 링크 생성 시 절대 경로(
/home/...),projects/접두사 누락, 또는 파일명만 기재할 경우 발생하던 404(찾을 수 없음) 및 400 에러를 차단하고, 클릭 시 선행 PR(#248: 전역 사이드 패널)과 연동하여 해당 문서를 우측 작업공간 패널에서 즉시 열람할 수 있도록 지원합니다.🛠️ 주요 변경 사항
스마트
readDoc5단계 자동 탐색 (src/hub.mjs)projects//notes/접두사 자동 보정 ➔ Vault 디렉터리 재귀 파일명 탐색 ➔ 일지 보관함 5단계 알고리즘 구축비-md 서빙 API 경로 보정 (
app/api/companies/[ws]/files/route.js)projects/접두가 생략되어 요청된 비-md 파일(PDF, PNG, PPTX 등) 요청에 대해 actual path 점검 후 자동 보정마크다운 href 정규식 수정 (
app/ui.jsx)/로 시작하는 절대 파일 경로도rewriteVaultHref를 거쳐/c/[ws]/vault?doc=...URL로 재작성되도록 수정단위 테스트 보강 (
test/smart-read-doc.test.mjs&test/vault-links.test.mjs)🔍 핵심 변경 파일
src/hub.mjs:readDoc스마트 탐색 및findFileInVault재귀 탐색 알고리즘app/api/companies/[ws]/files/route.js: 비-md 서빙 경로 자동 보정app/ui.jsx: 마크다운 렌더러 절대 경로 파싱 정규식 개선test/smart-read-doc.test.mjs: 5개 단위 테스트 작성