Skip to content

feat: publish interactive universe graph - #114

Merged
trvny merged 2 commits into
mainfrom
feat/universe-graph
Oct 3, 2026
Merged

trvny merged 2 commits into
mainfrom
feat/universe-graph

Conversation

@trvny

@trvny trvny commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Publishes the interactive TRVNY/TRAVNIE infrastructure map inside the existing GitHubowa Kraina atlas and links it from the atlas landing page.

The graph covers repositories, repo components, Cloudflare Workers/Pages, service bindings, D1/KV/R2/Queues/Durable Objects, and key external systems. It includes search, operational presets, node tracing, and JSON/SVG downloads.

Snapshot verified against GitHub and Cloudflare on 2026-10-03. Secret values are excluded.

Co-authored-by: GPTomek <314538226+gptomek[bot]@users.noreply.github.com>

Summary by CodeRabbit

  • 新功能
    • 新增基础设施拓扑图,展示 GitHub 仓库、组件、Cloudflare 服务及外部系统之间的关系。
    • 可选择节点查看直接连接,并通过预设筛选或搜索查找节点。
    • 支持下载拓扑数据 JSON 和 SVG 图表。
    • 页面新增“基础设施地图”入口;地图标注快照日期,并注明未展示密钥及其值。

@deepsource-io

deepsource-io Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in b1a34f8...5575e6e on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Oct 3, 2026 1:07p.m. Review ↗
Python Oct 3, 2026 1:07p.m. Review ↗
Shell Oct 3, 2026 1:07p.m. Review ↗
SQL Oct 3, 2026 1:07p.m. Review ↗
Secrets Oct 3, 2026 1:07p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@mergify

mergify Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

✅MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ HTML djlint 2 0 0 1.27s
✅ HTML htmlhint 2 0 0 0.57s

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Walkthrough

Walkthrough

新增交互式基础设施拓扑页面,展示 TRVNY / TRAVNIE 的仓库、组件、Worker、存储资源和外部系统及其连接。页面支持节点选择、预设筛选、搜索,以及 JSON 和 SVG 下载。现有页面新增指向拓扑页面的链接。页面标注快照日期为 2026-10-03,并说明图中不展示密钥及其值。

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant TopologyPage
  participant TopologySVG
  participant DetailsPanel
  User->>TopologyPage: 选择节点
  TopologyPage->>TopologySVG: 突出显示节点及其直接连接
  TopologyPage->>DetailsPanel: 显示节点详情
Loading

Priority: ➖ Normal

Change: Feature

Merge Risk: 🔵 Low · up to 5575e

The new infrastructure map page is mostly usable, but screen-reader users may not be able to reach the node buttons. Highlight state can also look inconsistent after filtering. These are small fixes that can be made before or shortly after merge.

Architecture Summary

Architecture risk: 🔵 Low · up to 5575e

The change affects 1 system.

Changed systems: site

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — site (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in site/teksty/githubowa-kraina/index.html: 在 Hero 操作区新增链接,点击后导航至 /teksty/githubowa-kraina/universe.html。
  • observed — Modified behavior in site/teksty/githubowa-kraina/universe.html: 新增 HTML 文档元数据和暗色响应式样式,设置页面标题、描述、规范 URL,以及拓扑图、节点类别、控制区和详情面板的布局与视觉样式。
  • observed — Modified behavior in site/teksty/githubowa-kraina/universe.html: 新增页面主体,提供图谱操作按钮、搜索框、类别图例、SVG 图形容器、节点详情面板和快照说明。
  • observed — Modified behavior in site/teksty/githubowa-kraina/universe.html: 新增节点数据,描述 TRVNY / TRAVNIE 仓库、源码组件、Cloudflare Worker、存储资源及外部系统的标识、分类、位置、链接、说明和预设标签。
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题“feat: publish interactive universe graph”简洁且准确,概括了新增交互式基础设施拓扑图这一主要变更。
Description check ✅ Passed 描述说明了基础设施图的内容、交互功能、下载选项及快照日期,与本次变更相关。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

小兔点开拓扑图,
节点连线一目了然。
搜索筛选轻轻点,
JSON 与 SVG 收进行囊。
月光下,兔耳摇呀摇。

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5dbede37-fd61-4813-992b-ff6c1914cafd
📥 Commits

Reviewing files that changed from the base of the PR and between b1a34f8 and 5575e6e.

📒 Files selected for processing (2)
  • site/teksty/githubowa-kraina/index.html
  • site/teksty/githubowa-kraina/universe.html

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


<div class="layout">
<div class="canvas">
<svg id="graph" viewBox="0 0 1330 930" role="img" aria-label="Interactive graph of TRVNY and TRAVNIE repositories and infrastructure">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

不要将可交互的图谱声明为单张图片。

role="img" 会使 SVG 的子元素成为呈现性内容。节点虽然设置了 role="button" 和键盘处理器,但部分浏览器的辅助技术无法识别这些节点按钮。请为图谱使用允许交互子元素的容器角色,并保留节点的名称和按钮角色。(w3.org)

Comment on lines +188 to +190
function select(id){
const n=byId.get(id), keep=new Set([id,...neighbors.get(id)]);
document.querySelectorAll(".node").forEach(el=>{el.classList.toggle("active",el.dataset.id===id);el.classList.toggle("dim",!keep.has(el.dataset.id))});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

再次选择同一节点时恢复总览。

select(id) 每次都会激活节点,因此再次点击或按 Enter、空格选择同一节点时,视图不会重置。详情面板却明确提示这一操作可以重置。请记录当前选择,并在重复选择时调用 reset()。

Comment on lines +201 to +205
document.querySelectorAll("[data-preset]").forEach(b=>b.classList.toggle("active",b.dataset.preset===tag));
if(tag==="all"){reset();return}
const keep=new Set(nodes.filter(n=>n.tags.includes(tag)).map(n=>n.id));
document.querySelectorAll(".node").forEach(el=>el.classList.toggle("dim",!keep.has(el.dataset.id)));
document.querySelectorAll(".edge").forEach(el=>el.classList.toggle("dim",!(keep.has(el.dataset.a)&&keep.has(el.dataset.b))));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

切换筛选方式时清除旧的选中状态。

选择节点后,切换到非 all 预设只更新 .dim,不会移除原节点和边的 .active。搜索处理器也保留这些 .active 类。结果是新筛选结果仍显示上一次选择的高亮。请在应用预设或搜索结果前清除选中状态,再计算当前筛选的样式。

🧰 Tools
🪛 ast-grep (0.45.3)

[warning] 205-205: Avoid assigning untrusted data to innerHTML/outerHTML or document.write
Context: details.innerHTML='Preset

'+escapeHtml(tag[0].toUpperCase()+tag.slice(1))+'

'+keep.size+' nodes in this operational slice.

Click any visible node to trace direct connections.
'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

(inner-outer-html)

@trvny
trvny merged commit eb1528d into main Oct 3, 2026
9 checks passed
@trvny
trvny deleted the feat/universe-graph branch October 3, 2026 13:09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5575e6ebbb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,229 @@
<!doctype html>
<html lang="en">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the English language declaration in production

This declaration is overwritten for every deployed HTML response by functions/_middleware.js:292-295, while the response header is also forced to content-language: pl at line 331. Consequently, this English-only page is exposed as Polish to screen readers and language-aware translation/indexing tools; exempt this route from the global override or make the middleware preserve the document language.

Useful? React with 👍 / 👎.


<div class="layout">
<div class="canvas">
<svg id="graph" viewBox="0 0 1330 930" role="img" aria-label="Interactive graph of TRVNY and TRAVNIE repositories and infrastructure">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose the interactive nodes to assistive technology

Giving the containing SVG role="img" makes its descendants presentational in the accessibility tree, so the focusable role="button" nodes created at line 176 are not exposed as individual controls to screen-reader users. Use a non-image container role for this interactive graph, or provide an equivalent accessible control list outside the image.

Useful? React with 👍 / 👎.

Comment on lines +188 to +190
function select(id){
const n=byId.get(id), keep=new Set([id,...neighbors.get(id)]);
document.querySelectorAll(".node").forEach(el=>{el.classList.toggle("active",el.dataset.id===id);el.classList.toggle("dim",!keep.has(el.dataset.id))});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Track and clear the selected graph node

The selection handler never reads or updates the declared selectedId, so selecting the same node always reapplies the neighborhood instead of performing the reset promised in the details panel. The same missing state cleanup leaves the old node and edges with their active styling when a non-all preset or a nonempty search is applied, producing stale highlights alongside the new filter details; toggle the current ID here and clear it when changing modes.

Useful? React with 👍 / 👎.

@kanarek-companion

Copy link
Copy Markdown

🐤 Kanarek · 🟣 merged

main ✅

Main has acquired another resident. Welcome aboard.

Frontend · 2 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant