Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

CBM Lens renders a .tsx file as its .css sibling (extension-less qn collision) + File-node snippets silently capped at 51 lines

未关闭
#2,791 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
css, typescript

调研方向

Start at the reader fallback that derives a qualified name from a File node and the snippet retrieval path that returns its source; inspect the corresponding tests for qualified-name lookup and file snippets. Reproduce with same-stem .tsx and .css files and a file longer than 51 lines. Done when each extension returns its own content and long file snippets have complete source or truthful pagination metadata.

由索引模型根据 Issue 内容生成。

描述

bug parsing/quality ux/behavior

Two independent reader bugs on v0.12.1 (latest, macOS arm64), large TS monorepo (26k nodes), healthy index (parse_unusable: 0).

1) A .tsx file renders as its .css sibling

Data layer is fine when the qn keeps its extension (...index.tsx.__file__ vs ...index.css.__file__ return the correct source for each).

The breakage is the reader's fallback path:

  • The indexer creates only ONE Module node per same-stem group, assigned to the CSS file, with the extension stripped:
    • MATCH (n:Module) WHERE n.file_path = ".../LogoTitleView/index.css" -> 1 row, qn = P.cake.src.component.LogoTitleView.index
    • MATCH (n:Module) WHERE n.file_path = ".../LogoTitleView/index.tsx" -> 0 rows
  • On a miss, the reader falls back to the File node and derives the qn by stripping .__file__ and then the last dotted segment:
    ...LogoTitleView.index.tsx.__file__ -> ...LogoTitleView.index.tsx -> ...LogoTitleView.index
  • That equals the CSS Module qn, so the fetch returns the wrong node:
$ cli get_code_snippet --qualified-name "P.cake.src.component.LogoTitleView.index" --source-mode full
label: Module
file_path: .../LogoTitleView/index.css   # requested index.tsx

Result: clicking index.tsx shows CSS; clicking index.css shows CSS; both panes look identical.

Scale here: 1036 .tsx File nodes, only 250 have their own Module node; 783 .tsx files share a stem with a CSS Module node and render the wrong content.

Expected: fallback should keep the extension (strip only .__file__), and/or don't collapse different-language files into one extension-less Module qn.

2) File-node snippets silently cap at 51 lines

  • ...BtnFood/index.css.__file__ (215 lines) -> 51 lines returned, end_line: 51, next_start_line: null, source_truncated: null
  • ...ratings/src/index.tsx.__file__ (466 lines) -> 51 lines, same
  • ...LogoTitleView/index.css.__file__ (19 lines) -> full content but end_line: 51 (wrong metadata)

File nodes store start_line/end_line = 0/0, so 51 looks like a server-side default window. With no continuation marker the reader cannot page and shows no truncation notice.

Expected: return full source, or set next_start_line / source_truncated + truthful original_end_line.

Workaround: use symbol-level nodes (they keep the real qn) and read whole files from disk beyond 51 lines.

主要语言
C
星标
45.8k
派生
3.8k
平均合并
3 天 6 小时
30 天内合并 PR
201

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DeusData/codebase-memory-mcp 的其他 Issue

查看 DeusData/codebase-memory-mcp 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。