Merge branch 'main' into pr/wss-https-fallback

This commit is contained in:
sagit
2026-03-09 18:20:07 +08:00
committed by GitHub
17 changed files with 6468 additions and 309 deletions
@@ -0,0 +1,30 @@
# Session Context
Session ID: ses_32f7e3b05ffeK8IxNvZAZISGWO
Commit Message: 编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
## Prompts
### Prompt 1
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
### Prompt 2
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
### Prompt 3
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
### Prompt 4
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
### Prompt 5
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
## Summary
已成功构建并推送 `ghcr.io/sagit-chu/vite-frontend:beta` (linux/amd64)
File diff suppressed because one or more lines are too long
@@ -0,0 +1,17 @@
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
---
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
---
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
---
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
---
编译docker 镜像 ghcr.io/sagit-chu/vite-frontend:beta linux/amd64架构 推送
@@ -0,0 +1 @@
已成功构建并推送 `ghcr.io/sagit-chu/vite-frontend:beta` (linux/amd64)
@@ -7,13 +7,13 @@
"title": "规则页精简模式显示规则数量",
"version": "1.2.21",
"summary": {
"additions": 67,
"deletions": 57,
"files": 1
"additions": 4529,
"deletions": 65,
"files": 11
},
"time": {
"created": 1773020783005,
"updated": 1773020978012
"updated": 1773022814998
}
},
"messages": [
@@ -3536,6 +3536,505 @@
"messageID": "msg_cd0491b35001Gyu7B4fNEHivH2"
}
]
},
{
"info": {
"role": "user",
"time": {
"created": 1773022792451
},
"summary": {
"diffs": []
},
"agent": "build",
"model": {
"providerID": "api",
"modelID": "gemini-3.1-pro-high"
},
"id": "msg_cd064ca87001mKUQE2EyR8PezH",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8"
},
"parts": [
{
"type": "text",
"text": "这个没改对,页面没变化,请检查",
"id": "prt_cd064ca87002we266x5BvrANpB",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd064ca87001mKUQE2EyR8PezH"
}
]
},
{
"info": {
"role": "assistant",
"time": {
"created": 1773022792467,
"completed": 1773022801627
},
"parentID": "msg_cd064ca87001mKUQE2EyR8PezH",
"modelID": "gemini-3.1-pro-high",
"providerID": "api",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon",
"root": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon"
},
"cost": 0,
"tokens": {
"total": 58585,
"input": 58084,
"output": 59,
"reasoning": 442,
"cache": {
"read": 0,
"write": 0
}
},
"finish": "tool-calls",
"id": "msg_cd064cb13001TWoWh6nBESUPZl",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8"
},
"parts": [
{
"type": "step-start",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"id": "prt_cd064ee23001PcfPcy835V87tU",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd064cb13001TWoWh6nBESUPZl"
},
{
"type": "tool",
"callID": "bash-1773022801288808061-252",
"tool": "bash",
"state": {
"status": "completed",
"input": {
"command": "git show HEAD:vite-frontend/src/pages/forward.tsx | grep -B 5 -A 20 \"根据显示模式渲染不同内容\"",
"description": "Check original code structure for rendering modes"
},
"output": " value={batchProgress.percent}\n />\n </div>\n )}\n\n {/* 根据显示模式渲染不同内容 */}\n {compactMode ? (\n viewMode === \"grouped\" ? (\n sortedForwards.length > 0 ? (\n <>\n <div className=\"flex items-center justify-between px-1 mb-3\">\n <span className=\"text-sm font-semibold text-foreground\">\n 全部规则\n </span>\n <span className=\"text-xs text-default-600\">\n {sortedForwards.length} 条规则\n </span>\n </div>\n <div className=\"overflow-hidden rounded-xl border border-divider bg-content1 shadow-md\">\n <DndContext\n collisionDetection={closestCenter}\n sensors={sensors}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={sortableForwardIds}\n",
"title": "Check original code structure for rendering modes",
"metadata": {
"output": " value={batchProgress.percent}\n />\n </div>\n )}\n\n {/* 根据显示模式渲染不同内容 */}\n {compactMode ? (\n viewMode === \"grouped\" ? (\n sortedForwards.length > 0 ? (\n <>\n <div className=\"flex items-center justify-between px-1 mb-3\">\n <span className=\"text-sm font-semibold text-foreground\">\n 全部规则\n </span>\n <span className=\"text-xs text-default-600\">\n {sortedForwards.length} 条规则\n </span>\n </div>\n <div className=\"overflow-hidden rounded-xl border border-divider bg-content1 shadow-md\">\n <DndContext\n collisionDetection={closestCenter}\n sensors={sensors}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={sortableForwardIds}\n",
"exit": 0,
"description": "Check original code structure for rendering modes",
"truncated": false
},
"time": {
"start": 1773022801444,
"end": 1773022801445
}
},
"id": "prt_cd064ee24001VvqiBXMcI8KgPH",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd064cb13001TWoWh6nBESUPZl"
},
{
"type": "step-finish",
"reason": "tool-calls",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"cost": 0,
"tokens": {
"total": 58585,
"input": 58084,
"output": 59,
"reasoning": 442,
"cache": {
"read": 0,
"write": 0
}
},
"id": "prt_cd064ee250016oJVS2eLQzwT01",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd064cb13001TWoWh6nBESUPZl"
}
]
},
{
"info": {
"role": "assistant",
"time": {
"created": 1773022801632,
"completed": 1773022806653
},
"parentID": "msg_cd064ca87001mKUQE2EyR8PezH",
"modelID": "gemini-3.1-pro-high",
"providerID": "api",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon",
"root": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon"
},
"cost": 0,
"tokens": {
"total": 58423,
"input": 1479,
"output": 44,
"reasoning": 0,
"cache": {
"read": 56900,
"write": 0
}
},
"finish": "tool-calls",
"id": "msg_cd064eedf001lx0GW03y2zsL2c",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8"
},
"parts": [
{
"type": "step-start",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"id": "prt_cd06501d0001fbtq5FOqwf6wp7",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd064eedf001lx0GW03y2zsL2c"
},
{
"type": "tool",
"callID": "bash-1773022806321799405-253",
"tool": "bash",
"state": {
"status": "completed",
"input": {
"description": "Check exactly what I changed in my last commit",
"command": "git diff HEAD~1 HEAD vite-frontend/src/pages/forward.tsx"
},
"output": "",
"title": "Check exactly what I changed in my last commit",
"metadata": {
"output": "",
"exit": 0,
"description": "Check exactly what I changed in my last commit",
"truncated": false
},
"time": {
"start": 1773022806480,
"end": 1773022806481
}
},
"id": "prt_cd06501d0002aJQPoXzQjQ6QxP",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd064eedf001lx0GW03y2zsL2c"
},
{
"type": "step-finish",
"reason": "tool-calls",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"cost": 0,
"tokens": {
"total": 58423,
"input": 1479,
"output": 44,
"reasoning": 0,
"cache": {
"read": 56900,
"write": 0
}
},
"id": "prt_cd06501d1001UHeBODXWcVRT3P",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd064eedf001lx0GW03y2zsL2c"
}
]
},
{
"info": {
"role": "assistant",
"time": {
"created": 1773022806657,
"completed": 1773022810679
},
"parentID": "msg_cd064ca87001mKUQE2EyR8PezH",
"modelID": "gemini-3.1-pro-high",
"providerID": "api",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon",
"root": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon"
},
"cost": 0,
"tokens": {
"total": 58460,
"input": 1540,
"output": 25,
"reasoning": 0,
"cache": {
"read": 56895,
"write": 0
}
},
"finish": "tool-calls",
"id": "msg_cd065028100100U8RbhbWKxrf3",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8"
},
"parts": [
{
"type": "step-start",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"id": "prt_cd06511890014PkWgUY9CAmTPd",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065028100100U8RbhbWKxrf3"
},
{
"type": "tool",
"callID": "bash-1773022810346559153-254",
"tool": "bash",
"state": {
"status": "completed",
"input": {
"description": "Check latest commit",
"command": "git log -1"
},
"output": "commit 78af992b6fde82eb3af4d09daa02a43866210636\nAuthor: sagitchu <sagitchu@gmail.com>\nDate: Mon Mar 9 09:59:59 2026 +0800\n\n fix: restore renewal.ts from main to resolve build errors\n",
"title": "Check latest commit",
"metadata": {
"output": "commit 78af992b6fde82eb3af4d09daa02a43866210636\nAuthor: sagitchu <sagitchu@gmail.com>\nDate: Mon Mar 9 09:59:59 2026 +0800\n\n fix: restore renewal.ts from main to resolve build errors\n",
"exit": 0,
"description": "Check latest commit",
"truncated": false
},
"time": {
"start": 1773022810506,
"end": 1773022810506
}
},
"id": "prt_cd065118a0014hx1B9opNcSfJl",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065028100100U8RbhbWKxrf3"
},
{
"type": "step-finish",
"reason": "tool-calls",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"cost": 0,
"tokens": {
"total": 58460,
"input": 1540,
"output": 25,
"reasoning": 0,
"cache": {
"read": 56895,
"write": 0
}
},
"id": "prt_cd065118b001SISeN0O2IRDH5C",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065028100100U8RbhbWKxrf3"
}
]
},
{
"info": {
"role": "assistant",
"time": {
"created": 1773022810683,
"completed": 1773022814810
},
"parentID": "msg_cd064ca87001mKUQE2EyR8PezH",
"modelID": "gemini-3.1-pro-high",
"providerID": "api",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon",
"root": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon"
},
"cost": 0,
"tokens": {
"total": 58595,
"input": 1681,
"output": 24,
"reasoning": 0,
"cache": {
"read": 56890,
"write": 0
}
},
"finish": "tool-calls",
"id": "msg_cd065123a001uXPsKZwVH7RDJb",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8"
},
"parts": [
{
"type": "step-start",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"id": "prt_cd06521a8001yiaSoVddfbN1tj",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065123a001uXPsKZwVH7RDJb"
},
{
"type": "tool",
"callID": "bash-1773022814469937121-255",
"tool": "bash",
"state": {
"status": "completed",
"input": {
"description": "Check history",
"command": "git log -3"
},
"output": "commit 78af992b6fde82eb3af4d09daa02a43866210636\nAuthor: sagitchu <sagitchu@gmail.com>\nDate: Mon Mar 9 09:59:59 2026 +0800\n\n fix: restore renewal.ts from main to resolve build errors\n\ncommit f790becda8ead611b847637daafad6e7d40d8115\nMerge: e7548e7 413081f\nAuthor: sagitchu <sagitchu@gmail.com>\nDate: Mon Mar 9 09:58:02 2026 +0800\n\n merge: resolve conflicts with main branch\n\ncommit e7548e7b30ecd1c73e4ef98f5d36e6b6394c209a\nAuthor: sagitchu <sagitchu@gmail.com>\nDate: Mon Mar 9 09:51:28 2026 +0800\n\n style(frontend): format code and improve node card layout\n \n Entire-Checkpoint: 08b760b76538\n",
"title": "Check history",
"metadata": {
"output": "commit 78af992b6fde82eb3af4d09daa02a43866210636\nAuthor: sagitchu <sagitchu@gmail.com>\nDate: Mon Mar 9 09:59:59 2026 +0800\n\n fix: restore renewal.ts from main to resolve build errors\n\ncommit f790becda8ead611b847637daafad6e7d40d8115\nMerge: e7548e7 413081f\nAuthor: sagitchu <sagitchu@gmail.com>\nDate: Mon Mar 9 09:58:02 2026 +0800\n\n merge: resolve conflicts with main branch\n\ncommit e7548e7b30ecd1c73e4ef98f5d36e6b6394c209a\nAuthor: sagitchu <sagitchu@gmail.com>\nDate: Mon Mar 9 09:51:28 2026 +0800\n\n style(frontend): format code and improve node card layout\n \n Entire-Checkpoint: 08b760b76538\n",
"exit": 0,
"description": "Check history",
"truncated": false
},
"time": {
"start": 1773022814633,
"end": 1773022814633
}
},
"id": "prt_cd06521a8002I2rlXCrLkmKM1d",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065123a001uXPsKZwVH7RDJb"
},
{
"type": "step-finish",
"reason": "tool-calls",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"cost": 0,
"tokens": {
"total": 58595,
"input": 1681,
"output": 24,
"reasoning": 0,
"cache": {
"read": 56890,
"write": 0
}
},
"id": "prt_cd06521a9001CzTlcvvzi6vd8Y",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065123a001uXPsKZwVH7RDJb"
}
]
},
{
"info": {
"role": "assistant",
"time": {
"created": 1773022814814,
"completed": 1773022818942
},
"parentID": "msg_cd064ca87001mKUQE2EyR8PezH",
"modelID": "gemini-3.1-pro-high",
"providerID": "api",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon",
"root": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon"
},
"cost": 0,
"tokens": {
"total": 58974,
"input": 2054,
"output": 33,
"reasoning": 0,
"cache": {
"read": 56887,
"write": 0
}
},
"finish": "tool-calls",
"id": "msg_cd065225e0010wlkl67le6h46g",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8"
},
"parts": [
{
"type": "step-start",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"id": "prt_cd06531d8001vtXeqUZ9z4fx14",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065225e0010wlkl67le6h46g"
},
{
"type": "tool",
"callID": "bash-1773022818624349202-256",
"tool": "bash",
"state": {
"status": "completed",
"input": {
"command": "git log --oneline | head -n 10",
"description": "Check recent commits"
},
"output": "78af992 fix: restore renewal.ts from main to resolve build errors\nf790bec merge: resolve conflicts with main branch\ne7548e7 style(frontend): format code and improve node card layout\n50e4107 fix(frontend): show rule count in compact view mode for forward pages\n413081f feat(nodes): add renewal cycle and auto-advance scheduling (#296)\nbfac640 feat(nodes): add renewal cycle and auto-advance scheduling\n508a37a feat(nodes): add node metadata and expiry reminders (#293)\nd606550 feat(forward): display tunnel traffic ratio on forward page\n31ef861 feat(nodes): add node metadata and expiry reminders (#246)\nf1bdb2e feat(frontend): implement AJAX no-refresh UX improvements (#276)\n",
"title": "Check recent commits",
"metadata": {
"output": "78af992 fix: restore renewal.ts from main to resolve build errors\nf790bec merge: resolve conflicts with main branch\ne7548e7 style(frontend): format code and improve node card layout\n50e4107 fix(frontend): show rule count in compact view mode for forward pages\n413081f feat(nodes): add renewal cycle and auto-advance scheduling (#296)\nbfac640 feat(nodes): add renewal cycle and auto-advance scheduling\n508a37a feat(nodes): add node metadata and expiry reminders (#293)\nd606550 feat(forward): display tunnel traffic ratio on forward page\n31ef861 feat(nodes): add node metadata and expiry reminders (#246)\nf1bdb2e feat(frontend): implement AJAX no-refresh UX improvements (#276)\n",
"exit": 0,
"description": "Check recent commits",
"truncated": false
},
"time": {
"start": 1773022818776,
"end": 1773022818776
}
},
"id": "prt_cd06531d8002HjsfEaDHfZzBM7",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065225e0010wlkl67le6h46g"
},
{
"type": "step-finish",
"reason": "tool-calls",
"snapshot": "97ed982edddf0655a654981a72da08c33b9e467d",
"cost": 0,
"tokens": {
"total": 58974,
"input": 2054,
"output": 33,
"reasoning": 0,
"cache": {
"read": 56887,
"write": 0
}
},
"id": "prt_cd06531d9001eYxQ5nQBoU1rsk",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8",
"messageID": "msg_cd065225e0010wlkl67le6h46g"
}
]
},
{
"info": {
"role": "assistant",
"time": {
"created": 1773022818946,
"completed": 1773022824318
},
"error": {
"name": "MessageAbortedError",
"data": {
"message": "The operation was aborted."
}
},
"parentID": "msg_cd064ca87001mKUQE2EyR8PezH",
"modelID": "gemini-3.1-pro-high",
"providerID": "api",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon",
"root": "/Users/sagit/.local/share/opencode/worktree/13650be91caa3a9e08a2e63127fef62757658384/quiet-canyon"
},
"cost": 0,
"tokens": {
"input": 0,
"output": 0,
"reasoning": 0,
"cache": {
"read": 0,
"write": 0
}
},
"id": "msg_cd0653282001hDYLdWTwLVss9i",
"sessionID": "ses_32fb9de62ffeXG3aOGlPDusGE8"
},
"parts": []
}
]
}
@@ -1 +1 @@
规则标签页下,精简模式,和非精简模式一样要显示规则数量
这个没改对,页面没变化,请检查
@@ -262,7 +262,6 @@ func (h *Handler) nodeCreate(w http.ResponseWriter, r *http.Request) {
nullableText(asString(req["interfaceName"])),
nullableText(""),
nullableText(strings.TrimSpace(asString(req["remark"]))),
nullableText(strings.TrimSpace(asString(req["tags"]))),
nullableUnixMilli(asInt64(req["expiryTime"], 0)),
nullableText(normalizeNodeRenewalCycle(asString(req["renewalCycle"]))),
asInt(req["http"], 0),
@@ -331,7 +330,6 @@ func (h *Handler) nodeUpdate(w http.ResponseWriter, r *http.Request) {
nullableText(asString(req["interfaceName"])),
nullableText(asString(req["extraIPs"])),
nullableText(strings.TrimSpace(asString(req["remark"]))),
nullableText(strings.TrimSpace(asString(req["tags"]))),
nullableUnixMilli(asInt64(req["expiryTime"], 0)),
nullableText(normalizeNodeRenewalCycle(asString(req["renewalCycle"]))),
newHTTP,
-2
View File
@@ -61,7 +61,6 @@ type Node struct {
ID int64 `gorm:"primaryKey;autoIncrement"`
Name string `gorm:"type:varchar(100);not null"`
Remark sql.NullString `gorm:"column:remark;type:text"`
Tags sql.NullString `gorm:"column:tags;type:text"`
ExpiryTime sql.NullInt64 `gorm:"column:expiry_time"`
RenewalCycle sql.NullString `gorm:"column:renewal_cycle;type:varchar(20)"`
Secret string `gorm:"type:varchar(100);not null"`
@@ -341,7 +340,6 @@ type NodeBackup struct {
ID int64 `json:"id"`
Name string `json:"name"`
Remark string `json:"remark,omitempty"`
Tags string `json:"tags,omitempty"`
ExpiryTime int64 `json:"expiryTime,omitempty"`
RenewalCycle string `json:"renewalCycle,omitempty"`
Secret string `json:"secret"`
+3 -5
View File
@@ -260,7 +260,7 @@ func prepareSQLiteLegacyColumns(db *gorm.DB) error {
m := db.Migrator()
if m.HasTable(&model.Node{}) {
for _, field := range []string{"ServerIPV4", "ServerIPV6", "ExtraIPs", "TCPListenAddr", "UDPListenAddr", "Inx", "IsRemote", "RemoteURL", "RemoteToken", "RemoteConfig", "Remark", "Tags", "ExpiryTime", "RenewalCycle"} {
for _, field := range []string{"ServerIPV4", "ServerIPV6", "ExtraIPs", "TCPListenAddr", "UDPListenAddr", "Inx", "IsRemote", "RemoteURL", "RemoteToken", "RemoteConfig", "Remark", "ExpiryTime", "RenewalCycle"} {
if m.HasColumn(&model.Node{}, field) {
continue
}
@@ -635,7 +635,6 @@ func (r *Repository) ListNodes() ([]map[string]interface{}, error) {
items = append(items, map[string]interface{}{
"id": n.ID, "inx": n.Inx, "name": n.Name,
"remark": nullableString(n.Remark),
"tags": nullableString(n.Tags),
"expiryTime": nullableInt64(n.ExpiryTime),
"renewalCycle": nullableString(n.RenewalCycle),
"ip": n.ServerIP, "serverIp": n.ServerIP,
@@ -1820,7 +1819,7 @@ func (r *Repository) exportNodes() ([]model.NodeBackup, error) {
for _, n := range nodes {
b := model.NodeBackup{
ID: n.ID, Name: n.Name, Secret: n.Secret, ServerIP: n.ServerIP,
Remark: n.Remark.String, Tags: n.Tags.String, RenewalCycle: n.RenewalCycle.String,
Remark: n.Remark.String, RenewalCycle: n.RenewalCycle.String,
Port: n.Port, HTTP: n.HTTP, TLS: n.TLS, Socks: n.Socks,
CreatedTime: n.CreatedTime, Status: n.Status,
TCPListenAddr: n.TCPListenAddr, UDPListenAddr: n.UDPListenAddr,
@@ -2179,7 +2178,6 @@ func importNodes(tx *gorm.DB, nodes []model.NodeBackup, now int64) (int, error)
ID: n.ID,
Name: n.Name,
Remark: sql.NullString{String: n.Remark, Valid: n.Remark != ""},
Tags: sql.NullString{String: n.Tags, Valid: n.Tags != ""},
ExpiryTime: sql.NullInt64{Int64: n.ExpiryTime, Valid: n.ExpiryTime > 0},
RenewalCycle: sql.NullString{String: n.RenewalCycle, Valid: n.RenewalCycle != ""},
Secret: n.Secret,
@@ -2206,7 +2204,7 @@ func importNodes(tx *gorm.DB, nodes []model.NodeBackup, now int64) (int, error)
err := tx.Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "id"}},
DoUpdates: clause.AssignmentColumns([]string{
"name", "remark", "tags", "expiry_time", "renewal_cycle", "secret", "server_ip", "server_ip_v4", "server_ip_v6", "port", "interface_name", "version",
"name", "remark", "expiry_time", "renewal_cycle", "secret", "server_ip", "server_ip_v4", "server_ip_v6", "port", "interface_name", "version",
"http", "tls", "socks", "updated_time", "status", "tcp_listen_addr", "udp_listen_addr",
"inx", "is_remote", "remote_url", "remote_token", "remote_config",
}),
@@ -51,7 +51,7 @@ func TestPrepareSQLiteLegacyColumnsAddsNodeMetadataColumns(t *testing.T) {
}
m := db.Migrator()
for _, field := range []string{"Remark", "Tags", "ExpiryTime", "RenewalCycle"} {
for _, field := range []string{"Remark", "ExpiryTime", "RenewalCycle"} {
if !m.HasColumn(&model.Node{}, field) {
t.Fatalf("expected node.%s column to exist", field)
}
@@ -197,14 +197,13 @@ func (r *Repository) GetUserDefaultsForTunnel(userID int64) (flow int64, num int
return user.Flow, user.Num, user.ExpTime, user.FlowResetTime, nil
}
func (r *Repository) CreateNode(name, secret, serverIP string, serverIPV4, serverIPV6, port, interfaceName, version, remark, tags, expiryTime, renewalCycle interface{}, httpFlag, tlsFlag, socksFlag int, now int64, status int, tcpAddr, udpAddr string, inx, isRemote int, remoteURL, remoteToken, remoteConfig, extraIPs interface{}) error {
func (r *Repository) CreateNode(name, secret, serverIP string, serverIPV4, serverIPV6, port, interfaceName, version, remark, expiryTime, renewalCycle interface{}, httpFlag, tlsFlag, socksFlag int, now int64, status int, tcpAddr, udpAddr string, inx, isRemote int, remoteURL, remoteToken, remoteConfig, extraIPs interface{}) error {
if r == nil || r.db == nil {
return errors.New("repository not initialized")
}
node := model.Node{
Name: name,
Remark: nullStringFromInterface(remark),
Tags: nullStringFromInterface(tags),
ExpiryTime: nullInt64FromInterface(expiryTime),
RenewalCycle: nullStringFromInterface(renewalCycle),
Secret: secret,
@@ -244,7 +243,7 @@ func (r *Repository) GetNodeStatusFields(nodeID int64) (status, httpFlag, tlsFla
return node.Status, node.HTTP, node.TLS, node.Socks, nil
}
func (r *Repository) UpdateNode(id int64, name, serverIP string, serverIPV4, serverIPV6, port, interfaceName, extraIPs, remark, tags, expiryTime, renewalCycle interface{}, httpFlag, tlsFlag, socksFlag int, tcpAddr, udpAddr string, now int64) error {
func (r *Repository) UpdateNode(id int64, name, serverIP string, serverIPV4, serverIPV6, port, interfaceName, extraIPs, remark, expiryTime, renewalCycle interface{}, httpFlag, tlsFlag, socksFlag int, tcpAddr, udpAddr string, now int64) error {
if r == nil || r.db == nil {
return errors.New("repository not initialized")
}
@@ -253,7 +252,6 @@ func (r *Repository) UpdateNode(id int64, name, serverIP string, serverIPV4, ser
Updates(map[string]interface{}{
"name": name,
"remark": nullStringFromInterface(remark),
"tags": nullStringFromInterface(tags),
"expiry_time": nullInt64FromInterface(expiryTime),
"renewal_cycle": nullStringFromInterface(renewalCycle),
"server_ip": serverIP,
+5
View File
@@ -0,0 +1,5 @@
# Node Full-Stack Tags Removal Plan
- [x] Remove node tags usage from frontend node management and dashboard views
- [x] Remove node tags fields from backend models, handlers, repository, and backup logic
- [x] Verify frontend build and backend tests pass after the removal
@@ -0,0 +1,5 @@
# PR 292 Node Page Merge Conflict Resolution Plan
- [x] Review the conflicted node page and identify all overlapping feature areas from main and PR #292
- [x] Merge tab split, per-tab search, remote usage cards, expiry filters, and renewal indicators into `vite-frontend/src/pages/node.tsx`
- [x] Build `vite-frontend` and fix any integration issues from the merged result
-2
View File
@@ -4,7 +4,6 @@ export interface NodeApiItem {
status: number;
inx?: number;
remark?: string;
tags?: string;
expiryTime?: number;
renewalCycle?: "month" | "quarter" | "year" | "";
syncError?: string;
@@ -220,7 +219,6 @@ export interface NodeMutationPayload {
status?: number;
inx?: number;
remark?: string;
tags?: string;
expiryTime?: number;
renewalCycle?: "month" | "quarter" | "year" | "";
serverIp?: string;
+1 -25
View File
@@ -90,7 +90,7 @@ export default function DashboardPage() {
};
}
const diffDays = Math.ceil(
const diffDays = Math.ceil(
(nextDueTime - Date.now()) / (1000 * 60 * 60 * 24),
);
@@ -122,16 +122,6 @@ const diffDays = Math.ceil(
};
};
const parseNodeTags = (tags?: string) => {
if (!tags) return [];
return tags
.split(",")
.map((tag) => tag.trim())
.filter(Boolean)
.slice(0, 3);
};
const renderNodeExpiryCard = (node: DashboardNodeExpiryItem) => {
const renewalSnapshot = getNodeRenewalSnapshot(
node.expiryTime,
@@ -141,7 +131,6 @@ const diffDays = Math.ceil(
renewalSnapshot.nextDueTime,
renewalSnapshot.state,
);
const tags = parseNodeTags(node.tags);
return (
<div
@@ -177,19 +166,6 @@ const diffDays = Math.ceil(
{node.remark.trim()}
</p>
)}
{tags.length > 0 && (
<div className="mt-3 flex flex-wrap gap-2">
{tags.map((tag) => (
<span
key={`${node.id}-${tag}`}
className="rounded-full bg-white/80 px-2 py-1 text-[11px] text-default-600 ring-1 ring-amber-200/80 dark:bg-white/5 dark:text-default-300 dark:ring-amber-500/20"
>
#{tag}
</span>
))}
</div>
)}
</div>
);
};
@@ -58,7 +58,6 @@ export interface DashboardNodeExpiryItem {
id: number;
name: string;
remark?: string;
tags?: string;
expiryTime?: number;
renewalCycle?: "month" | "quarter" | "year" | "";
}
@@ -222,7 +221,6 @@ const normalizeNodeExpiryReminders = (items: NodeApiItem[]) => {
id: item.id,
name: item.name || "",
remark: typeof item.remark === "string" ? item.remark : "",
tags: typeof item.tags === "string" ? item.tags : "",
renewalCycle: normalizeDashboardRenewalCycle(item.renewalCycle),
expiryTime:
typeof item.expiryTime === "number" && item.expiryTime > 0
File diff suppressed because it is too large Load Diff