Skip to content

Commit 7b432c1

Browse files
committed
style(notes): pin 注释固定→置顶与组序注释输入序口径(批6)
1 parent 177947c commit 7b432c1

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎app/src-tauri/src/commands.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ pub async fn update_note_tags(
556556
Ok(ok)
557557
}
558558

559-
/// 更新笔记固定状态(v0.10.0)。
559+
/// 更新笔记置顶状态(v0.10.0)。
560560
#[tauri::command]
561561
pub async fn update_note_pin(
562562
state: State<'_, AppState>,
@@ -570,7 +570,7 @@ pub async fn update_note_pin(
570570
.db
571571
.update_note_pin(id, pin)
572572
.map_err(|e| e.to_string())?;
573-
// REQ-278:固定状态变更——广播 notes 域
573+
// REQ-278:置顶状态变更——广播 notes 域
574574
crate::notify::emit_changed(&state.app, crate::notify::DataDomain::Notes);
575575
Ok(ok)
576576
}

‎app/src-tauri/src/db_notes.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl Db {
217217
})
218218
}
219219

220-
/// 更新笔记固定状态(v0.10.0;pin=0 取消,=1 固定)。
220+
/// 更新笔记置顶状态(v0.10.0;pin=0 取消,=1 置顶)。
221221
pub fn update_note_pin(&self, id: i64, pin: i64) -> Result<bool> {
222222
self.with_conn(|conn| {
223223
let affected = conn.execute(

‎app/src-tauri/src/types.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub struct Note {
119119
/// 属性 JSON 对象(v0.10.0;扩展位,None=无)
120120
#[serde(default)]
121121
pub properties: Option<String>,
122-
/// 固定标记(v0.10.0;0=未固定,1=固定)
122+
/// 置顶标记(v0.10.0;0=未置顶,1=置顶——置顶笔记在树/列表置顶区按更新时间定序)
123123
#[serde(default)]
124124
pub pin: i64,
125125
/// 所属笔记组 id(v0.11.0 REQ-195;None=未归组/旧数据——不猜不填)
@@ -613,7 +613,7 @@ pub struct BatchSessionDeleteResult {
613613
pub enum NoteSortMode {
614614
/// 按更新时间倒序(默认)
615615
UpdatedDesc,
616-
/// 固定优先 + 按更新时间倒序
616+
/// 置顶优先 + 按更新时间倒序
617617
PinFirst,
618618
/// 按创建时间倒序
619619
CreatedDesc,

‎app/src/components/GroupSidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ export default function GroupSidebar({
415415
{/* v0.14 C1:组分区(无查询→按 kind 分区+折叠记忆;有查询→扁平过滤结果) */}
416416
{filtering ? (
417417
<div style={{ display: "flex", flexDirection: "column", gap: 2 }}>
418-
{/* REQ-315:过滤平铺也走组展示序(置顶→手排→自动;跨 kind seq 撞值以 id 决胜) */}
418+
{/* REQ-315:过滤平铺也走组展示序(置顶→手排→自动;跨 kind seq 撞值并列保持输入序——稳定排序,无 id 决胜) */}
419419
{orderGroups(filteredGroups, orderRows).map(renderGroupRow)}
420420
{filteredGroups.length === 0 && (
421421
<p style={{ fontSize: 12, color: "#9ca3af", padding: "12px 8px" }}>无匹配组</p>

‎app/src/utils/groupOrder.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* 区内 updatedAt 降序)→ 手动序区(note_group_orders seq 升序)→
77
* 自动区(其余 updatedAt 降序),桶核心见 orderBuckets.ts。
88
* @ai-context: seq 为 kind 分区内相对序号:分区内调用语义精确;跨 kind 整表调用
9-
* (树组头/过滤平铺)时不同分区的 seq 撞值以 id 决胜——确定且稳定,
10-
* 非主表面不引入分区头。改判换分区时后端已同事务清行(见 Rust 层
11-
* override_group_route),不会带旧序占位。
9+
* (树组头/过滤平铺)时不同分区的 seq 撞值**并列保持输入序**(桶内
10+
* 稳定排序——输入确定则结果确定,无 id 决胜)。改判换分区时后端已
11+
* 同事务清行(见 Rust 层 override_group_route),不会带旧序占位。
1212
*/
1313
import { nonPinnedIds, orderPinnedSeqAuto, shiftInList } from "./orderBuckets";
1414

0 commit comments

Comments
 (0)