[Bug]: 定时任务「SOP 触发」面板的说明文字缺少水平内边距,文字贴卡片左边缘

Open Beginner friendly
#1,075 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
90/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
css
Domain
frontend

Research direction

Start with the #aiScheduleTriggerHint rule in web/sync.css and compare it with the existing #aiScheduleRuntimeHint rule. Apply the same horizontal spacing to the SOP trigger hint while keeping the change scoped to that element. Done when its text aligns with the panel heading and list at 16px from the left edge.

Written by the indexing model from the issue text.

Description

Component / host

Platform — web UI

Edition

Platform

LoopForge version

0.4.0(ghcr.io/tencent/loopforge:0.4.0,docker compose --profile platform)

What happened?

「定时任务 → SOP 触发」面板里,标题下方的说明文字紧贴卡片左边缘,没有任何水平内边距,
与同一张卡片内的标题、按钮、列表项都不对齐。

实际显示(文字直接顶到左边框):

按计划扫描本项目选定状态、尚未跑过 SOP 的需求,通过基线门禁后派发 SOP。每个项目使用一份触发配置。

期望:与同卡片内其它元素保持相同的水平内边距(16px),即文字左边缘与「SOP 自动派发」
标题左对齐。

定位:同一个视图里另一个面板补过这个间距,这个面板漏了。

web/sync.css 中:

  • #aiSchedulesView .ai-schedule-panel(第 139 行)只设置了 border / radius / background /
    overflow,没有 padding;
  • #aiSchedulesView .ai-schedule-panel-head(第 140 行)有 padding:14px 16px,
    所以标题和右侧按钮都对齐到 16px;
  • #aiSchedulesView .schedule-job-row(第 144 行)有 padding:14px 16px,列表项也对齐;
  • #aiSchedulesView .sync-empty(第 152 行)有 padding:48px 20px,空状态也居中留白;
  • 但 #aiScheduleTriggerHint(.schedule-field-hint,第 82 行)只有
    margin:6px 0 0,左右为 0,因此直接贴边。

关键对照:同一视图的「提示词任务」面板里,同类元素被单独补了内边距——

/* web/sync.css:141 */
#aiSchedulesView #aiScheduleRuntimeHint { padding:12px 16px; margin:0; color:var(--hui-secondary); font-size:12px; line-height:1.6; }

也就是说:#aiScheduleRuntimeHint 与 #aiScheduleTriggerHint 使用同一个
.schedule-field-hint 类,前者被单独覆写补齐了 padding,后者没有被覆写。
两个面板因此风格不一致——一个对齐,一个贴边。

首次进入「提示词任务」面板时该行文字为空(<p id="aiScheduleRuntimeHint" ...></p>),
所以只有「SOP 触发」面板能直接看出这个错位。

Reproduction
  1. 顶栏选择一个项目
  2. 进入「定时任务」
  3. 切到「SOP 触发」标签页
  4. 观察到标题「SOP 自动派发」下方那行说明文字紧贴卡片左边框,与标题不在同一条左基准线上
Sanitized diagnostics
web/sync.css:82   .schedule-field-hint { margin:6px 0 0; font-size:11px; ... }        ← 左右为 0
web/sync.css:139  #aiSchedulesView .ai-schedule-panel { border:...; overflow:hidden; } ← 无 padding
web/sync.css:140  #aiSchedulesView .ai-schedule-panel-head { ... padding:14px 16px; }  ← 标题有 16px
web/sync.css:141  #aiSchedulesView #aiScheduleRuntimeHint { padding:12px 16px; ... }   ← 同类元素已补
web/sync.css:144  #aiSchedulesView .schedule-job-row { padding:14px 16px; ... }        ← 列表项有 16px
web/sync.css:152  #aiSchedulesView .sync-empty { padding:48px 20px; ... }              ← 空状态有留白

web/index.html:258 的 #aiScheduleTriggerHint 只带 class="schedule-field-hint",
渲染时 web/app/sync-schedule.js:468 只更新 textContent,不改样式。

Expected behavior

「SOP 触发」面板的说明文字与「提示词任务」面板保持一致的水平内边距(16px),
使标题、说明、列表左边缘落在同一条基准线上。

建议按既有做法处理,而不是给 .schedule-field-hint 全局加左右 margin——
该 class 也被弹窗内的表单字段使用(#scheduleModal),全局改动会影响其它布局:

#aiSchedulesView #aiScheduleTriggerHint { padding:12px 16px 0; margin:0; }
Safety checks
  • I removed credentials, private endpoints, internal identifiers, and personal data.
  • I searched existing issues for duplicates.
Dominant language
Go
Stars
711
Forks
114
Avg merge
15h
Merged PRs (30d)
134

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tencent/LoopForge

All issues in Tencent/LoopForge

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.