Skip to content

保证pnpmdev不会因为包链接的错误而报错;将library的前端进行分块。#86

Merged
martinhamburger merged 1 commit intoabraxas914:mainfrom
martinhamburger:main
Mar 30, 2026
Merged

保证pnpmdev不会因为包链接的错误而报错;将library的前端进行分块。#86
martinhamburger merged 1 commit intoabraxas914:mainfrom
martinhamburger:main

Conversation

@martinhamburger
Copy link
Copy Markdown
Collaborator

概述

这个 PR 主要做了两件事:

  1. 提升本地扩展开发时 pnpm dev 的稳定性,避免因为本地 workspace 包未预构建而启动失败
  2. 优化 Library 详情页的前端结构,把详情内容整理成更清晰的分块卡片布局

改动内容

  • frontend 增加 predev,在启动 plasmo dev 前先构建 @vesti/content-package
  • 增加 dev:verbose 脚本,方便本地排查 Plasmo 启动问题
  • 重构 Library 详情页的分区展示结构
  • 优化 Original Conversation 的折叠预览排版,减少拥挤感,保留展开查看完整消息的能力
  • 保留现有 split view、annotation、excerpt、timestamp footer 等交互能力,不回退主线已有功能

验证

  • pnpm -C frontend exec tsc --noEmit
  • pnpm -C packages/vesti-ui build
  • pnpm -C frontend build

备注

  • 这次改动不涉及后端逻辑和数据结构变更
  • 重点是本地开发体验和 Library 详情页可读性提升

Copilot AI review requested due to automatic review settings March 30, 2026 03:22
@martinhamburger martinhamburger merged commit c42ba55 into abraxas914:main Mar 30, 2026
3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

该 PR 聚焦于提升本地开发体验(避免 pnpm dev 因 workspace 包未预构建而失败),并重构 Library 详情页为更清晰的分块卡片布局,同时保留 split view、annotation、excerpt、timestamp footer 等现有交互能力。

Changes:

  • frontend 增加 predev(启动 dev 前先 build @vesti/content-package)与 dev:verbose 脚本。
  • 重构 LibraryTab 详情页结构,引入分块卡片(Overview / Original Conversation / Related Notes / Related Conversations)与更清晰的折叠预览。
  • 调整会话展开逻辑(非 split 默认折叠)并补充预览文本计算。

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/vesti-ui/src/tabs/library-tab.tsx Library 详情页 UI 分块重构、预览/折叠交互与相关内容展示调整
frontend/package.json 增加 predevdev:verbose 以提升本地启动稳定性与可观测性

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1036 to +1042
const originalConversationPreview = useMemo(() => {
if (messagesLoading) {
return "Loading messages...";
}
if (messages.length === 0) {
return "No messages captured yet.";
}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

originalConversationPreview does not consider messagesError. If the fetch fails, messages is cleared and the preview currently falls back to “No messages captured yet.” which is misleading. Consider returning an error-specific preview when messagesError is set.

Copilot uses AI. Check for mistakes.
Comment on lines 4017 to +4023
<button
key={note.id}
onClick={() => void openNotesView(note.id)}
className="w-full flex items-center justify-between p-3 rounded-lg hover:bg-bg-surface-card transition-colors group"
onClick={() =>
console.log("[dashboard] Link a conversation")
}
className="text-xs font-sans text-accent-primary"
>
<span className="text-[13px] font-sans text-text-primary">
{note.title}
</span>
<span className="text-[13px] font-sans text-accent-primary">
Open →
</span>
+ Link a conversation
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

There’s a user-facing “+ Link a conversation” button here that only logs to console. This looks like leftover placeholder/debug behavior; it should either be implemented, removed, or disabled/hidden until linking is supported.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

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

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: d538c8e3b3

ℹ️ 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".

const isReaderConversationExpanded = isSplitActive || isConversationExpanded;
const canToggleConversationExpanded = !isSplitActive && messageCount > 0;
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 Surface message-load errors when conversation view is collapsed

In single-pane mode, the conversation section now starts collapsed and this toggle is only enabled when messageCount > 0. When getMessages fails, messages is cleared and messagesError is set, so users cannot expand the section to see the existing "Unable to load messages." state; the collapsed preview path instead presents it like an empty conversation. This makes backend/network failures look like missing data and removes the only visible error path for that case.

Useful? React with 👍 / 👎.

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.

2 participants