Skip to content

feat: calm dashboard workspace#334

Merged
jerry609 merged 1 commit into
devfrom
feat/dashboard-calm-workspace
Mar 11, 2026
Merged

feat: calm dashboard workspace#334
jerry609 merged 1 commit into
devfrom
feat/dashboard-calm-workspace

Conversation

@jerry609

Copy link
Copy Markdown
Owner

Summary

  • consolidate the dashboard into a calmer workspace layout with a continuous Today rail and a progressive workflow control panel
  • add dashboard intelligence helpers and supporting API/types so the new dashboard sections can render cleanly
  • refresh the README dashboard screenshot and improve deadline radar matching with track keywords, methods, and venues

Validation

  • pytest tests/unit/test_research_paper_registry_routes.py -q -k deadline_radar_route_returns_workflow_query_and_track_match
  • npx vitest run src/lib/dashboard-intelligence.test.ts
  • npx eslint src/app/dashboard/page.tsx src/components/research/TopicWorkflowDashboard.tsx src/lib/dashboard-api.ts src/lib/dashboard-intelligence.ts src/lib/types.ts
  • npm run build

Copilot AI review requested due to automatic review settings March 11, 2026 06:39
@vercel

vercel Bot commented Mar 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
paper-bot Ready Ready Preview, Comment Mar 11, 2026 7:00am

@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0c179111-2b44-4d93-9a1a-4485e62efeaa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/dashboard-calm-workspace

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

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

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a comprehensive overhaul of the dashboard, transforming it into a more focused and intuitive workspace. The changes aim to simplify the user interface, enhance the presentation of critical information through new intelligence features, and improve the precision of automated alerts like the deadline radar. The refactoring also streamlines the research workflow controls, making the dashboard a central hub for managing research activities efficiently.

Highlights

  • Dashboard UI Redesign: The dashboard has been completely refactored to a calmer workspace layout, featuring a continuous 'Today' rail and a progressive workflow control panel for a more streamlined user experience.
  • Enhanced Dashboard Intelligence: New intelligence helpers and supporting API/types have been integrated to allow for cleaner rendering of new dashboard sections, providing more relevant and actionable insights.
  • Improved Deadline Radar Matching: The backend logic for the deadline radar has been refined to improve matching accuracy by incorporating track keywords, methods, and venues, ensuring more precise deadline tracking.
  • Consolidated Workflow Control: The TopicWorkflowDashboard component has been significantly updated to offer a more compact and integrated control surface, moving advanced settings to a side sheet and making core actions more accessible.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • README.md
    • Updated the dashboard screenshot description to reflect the new layout.
  • src/paperbot/api/routes/research.py
    • Added _normalize_deadline_match_terms to standardize terms for matching.
    • Introduced _collect_track_deadline_terms to gather relevant terms from research tracks.
    • Implemented _collect_conference_deadline_terms to extract terms from conference items.
    • Updated get_deadline_radar to utilize the new term collection functions for improved matching logic.
    • Modified get_deadline_radar to include matched_terms in the response for better context.
  • tests/unit/test_research_paper_registry_routes.py
    • Added a new test track named 'acl-track' with specific venues and methods.
    • Included an assertion to verify that 'acl' is present in the matched_terms for the 'ACL 2026' item in the deadline radar test.
  • web/src/app/dashboard/page.tsx
    • Refactored the dashboard page to implement a new calm workspace layout.
    • Introduced DashboardPageProps for search parameters.
    • Added new utility functions: getGreeting, formatRelativeTime, getQueuePriority, formatCurrency, buildQueuePreviewItems, buildBriefCards, buildActionLanes, getLaneTone, getEvidenceStyles.
    • Implemented new components: FocusDeadlinesPanel, SectionIntro, TonePill, FocusOverviewPanel, EvidencePreviewCard, TodayRail.
    • Updated data fetching to include fetchPapers and fetchIntelligenceFeed.
    • Removed old dashboard components like ActivityFeed, DashboardCommandCenter, DeadlineRadar, LLMUsageChart, PipelineStatus, ReadingQueue, ScholarSignalsPanel, TrackSpotlightSection.
  • web/src/components/research/TopicWorkflowDashboard.tsx
    • Added new Lucide icons: ArrowUpRightIcon, CompassIcon, SearchIcon, WorkflowIcon.
    • Introduced Switch component from components/ui/switch.
    • Defined new constants: SOURCE_LABELS, BRANCH_LABELS, PHASE_COPY, WORKFLOW_REFERENCE_LINKS.
    • Added new types: WorkflowWorkspaceTab, WorkflowDashboardContext.
    • Implemented new helper functions: getNextWorkflowAction, formatTimestamp, getStageState, getStagePresentation.
    • Introduced new UI components: WorkflowStageCard, WorkflowChip, WorkflowTogglePanel, WorkflowReferenceCard.
    • Removed query item management from ConfigSheetBody to streamline configuration.
    • Updated StreamProgressCard styling to use indigo colors and rounded borders.
    • Modified TopicWorkflowDashboard to accept dashboardContext and compact props.
    • Added new UI state variables: compactOptionsOpen, settingsOpen, workspaceTab.
    • Refactored topic query management into dedicated updateQuery, removeQuery, and addQuery functions.
    • Updated workflow action functions (runTopicSearch, runDailyPaperStream, runAnalyzeStream, runRepoEnrichment) to set workspaceTab.
    • Introduced a new layout for the workflow control panel, including quick summary badges and collapsible options for compact mode.
    • Updated the display of workflow statistics and the DAG view.
    • Changed TabsContent values from 'papers' to 'candidates' and 'markdown' to 'report', and added 'delivery' and 'log' tabs.
  • web/src/lib/dashboard-api.ts
    • Added IntelligenceFeedFilters interface for filtering intelligence feed requests.
    • Introduced fetchIntelligenceFeed function to retrieve intelligence feed data with optional filters.
  • web/src/lib/dashboard-intelligence.test.ts
    • Added a new test file for dashboard-intelligence utility functions.
    • Included tests for mapping external radar signals into dashboard cards and handling fallback reason chips and empty states.
  • web/src/lib/dashboard-intelligence.ts
    • Added a new file for dashboard intelligence utility functions.
    • Defined DashboardIntelligenceCard interface for structured intelligence data.
    • Implemented buildMetricLabel to format metric display strings.
    • Created buildReasonChips to generate descriptive reason chips for intelligence items.
    • Developed buildSignalHref to construct appropriate URLs for intelligence signals.
    • Designed buildResearchHref to create research-specific URLs for intelligence items.
    • Exported buildDashboardIntelligenceCards to process raw intelligence feed items into dashboard-ready cards, including handling empty states.
  • web/src/lib/types.ts
    • Added IntelligenceMatchedTrack interface to define matched track details for intelligence items.
    • Introduced IntelligenceFeedItem interface to represent individual intelligence signals.
    • Defined IntelligenceFeedResponse interface for the overall intelligence feed structure.
    • Updated DeadlineRadarItem interface to include an optional matched_terms array for more granular matching information.
Activity
  • jerry609 created the pull request with a clear summary of the changes and validation steps.
  • The pull request is ready for review, with unit tests and linting checks specified for validation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copilot AI 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.

Pull request overview

This PR reshapes the web dashboard into a calmer “workspace” layout (continuous Today rail + embedded workflow console) and adds supporting intelligence/deadline matching helpers and types so the new dashboard sections can render.

Changes:

  • Add “intelligence feed” types, API helper, and UI card-mapping utilities (with tests) for dashboard signals.
  • Redesign the dashboard page into a workspace layout and embed a compact TopicWorkflowDashboard.
  • Improve deadline radar matching by expanding term/token matching across track keywords/methods/venues and conference metadata.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
web/src/lib/types.ts Adds intelligence feed response/item types and extends deadline radar match payload shape.
web/src/lib/dashboard-intelligence.ts Builds dashboard-friendly “evidence cards” from intelligence feed items (incl. empty state).
web/src/lib/dashboard-intelligence.test.ts Adds unit tests for intelligence card mapping logic.
web/src/lib/dashboard-api.ts Adds fetchIntelligenceFeed API wrapper for the dashboard.
web/src/components/research/TopicWorkflowDashboard.tsx Major UI restructuring for a dashboard-friendly workflow console (compact mode + workspace tabs).
web/src/app/dashboard/page.tsx Replaces old dashboard with new workspace layout, Today rail, evidence snapshot, and embedded workflow.
src/paperbot/api/routes/research.py Expands deadline matching logic and returns matched_terms.
tests/unit/test_research_paper_registry_routes.py Extends deadline radar test coverage for the new matching behavior.
README.md Updates dashboard screenshot caption copy.

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

You can also share your feedback on Copilot code review. Take the survey.

const highPriorityQueue = queueItems.filter((item) => item.priority === "high").length
const failedTasks = tasks.filter((task) => task.status === "failed")
const urgentDeadlines = deadlines.filter((deadline) => deadline.days_left <= 14)
const signalCount = intelligenceCards.length

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

signalCount is derived from intelligenceCards.length, which currently includes the synthetic empty-state card. If you keep the placeholder card behavior, compute counts from intelligenceFeed.items.length (or filter out the placeholder id) so alerts/metrics don’t report a signal when there are none.

Suggested change
const signalCount = intelligenceCards.length
const signalCount = intelligenceFeed.items?.length ?? 0

Copilot uses AI. Check for mistakes.
Comment on lines +1107 to +1113
{intelligenceCards.length > 0 ? (
intelligenceCards.map((item) => <EvidencePreviewCard key={item.id} item={item} compact />)
) : (
<div className="rounded-2xl border border-dashed border-slate-300 bg-slate-50/50 p-5 text-sm leading-6 text-slate-600 md:col-span-2 xl:col-span-3">
当前没有需要上浮到首页的社区信号。可以直接在主工作台继续推进当前问题。
</div>
)}

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

This intelligenceCards.length > 0 check assumes the cards array can be empty, but buildDashboardIntelligenceCards([]) currently returns a synthetic empty-state card. That means the else branch won’t render. Either have the builder return [] for an empty feed, or simplify this section to always render the returned cards (including a dedicated empty-state card).

Suggested change
{intelligenceCards.length > 0 ? (
intelligenceCards.map((item) => <EvidencePreviewCard key={item.id} item={item} compact />)
) : (
<div className="rounded-2xl border border-dashed border-slate-300 bg-slate-50/50 p-5 text-sm leading-6 text-slate-600 md:col-span-2 xl:col-span-3">
当前没有需要上浮到首页的社区信号。可以直接在主工作台继续推进当前问题。
</div>
)}
{intelligenceCards.map((item) => (
<EvidencePreviewCard key={item.id} item={item} compact />
))}

Copilot uses AI. Check for mistakes.
Comment on lines +120 to +132
const qs = new URLSearchParams({
user_id: userId,
limit: String(limit),
})
if (filters?.source) qs.set("source", filters.source)
if (filters?.keyword) qs.set("keyword", filters.keyword)
if (filters?.repo) qs.set("repo", filters.repo)
if (filters?.sortBy) qs.set("sort_by", filters.sortBy)
if (filters?.sortOrder) qs.set("sort_order", filters.sortOrder)
if (filters?.trackId) qs.set("track_id", String(filters.trackId))

const payload = await fetchJsonOrNull<IntelligenceFeedResponse>(`/intelligence/feed?${qs.toString()}`)
return payload || {

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

fetchIntelligenceFeed calls /intelligence/feed, but there is no corresponding backend route registered under src/paperbot/api/routes in this repo (no /intelligence endpoints). Unless this is served elsewhere, this will always return the fallback empty payload and adds an extra request on every dashboard load. Either implement/register the backend route or update the path to an existing endpoint.

Suggested change
const qs = new URLSearchParams({
user_id: userId,
limit: String(limit),
})
if (filters?.source) qs.set("source", filters.source)
if (filters?.keyword) qs.set("keyword", filters.keyword)
if (filters?.repo) qs.set("repo", filters.repo)
if (filters?.sortBy) qs.set("sort_by", filters.sortBy)
if (filters?.sortOrder) qs.set("sort_order", filters.sortOrder)
if (filters?.trackId) qs.set("track_id", String(filters.trackId))
const payload = await fetchJsonOrNull<IntelligenceFeedResponse>(`/intelligence/feed?${qs.toString()}`)
return payload || {
// Currently, there is no backend route for `/intelligence/feed` in this repo.
// To avoid an unnecessary failing request, return the default payload directly.
return {

Copilot uses AI. Check for mistakes.
</div>
<div className="space-y-2">
{queryItems.map((query, index) => (
<div key={`${index}-${query}`} className="flex items-center gap-2 rounded-2xl border border-slate-200 bg-slate-50/80 px-3 py-2">

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

key={${index}-${query}} will change on every keystroke as the query string changes, causing the row (and its <Input>) to unmount/remount and potentially lose focus/cursor position while typing. Use a stable key per row (e.g., the index if the list is append/remove only, or store a generated id alongside each query item).

Suggested change
<div key={`${index}-${query}`} className="flex items-center gap-2 rounded-2xl border border-slate-200 bg-slate-50/80 px-3 py-2">
<div key={index} className="flex items-center gap-2 rounded-2xl border border-slate-200 bg-slate-50/80 px-3 py-2">

Copilot uses AI. Check for mistakes.
Comment on lines +816 to +820
fetchLLMUsage(14),
fetchDeadlineRadar("default"),
fetchIntelligenceFeed("default", 6, { sortBy: "delta", sortOrder: "desc" }),
fetchPapers(),
])

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

fetchPapers() pulls the entire papers library (/papers/library) just to enrich the small reading-queue preview. If the library is large this can significantly slow dashboard loads and increase backend load. Prefer fetching only the specific paper ids referenced by readingQueue (batch endpoint) or returning the needed metadata directly from fetchDashboardReadingQueue.

Copilot uses AI. Check for mistakes.
: { items: [], total: 0 }
const activeTrackFeed = activeTrackFeedResult.items || []
const activeTrackFeedTotal = activeTrackFeedResult.total || 0
const intelligenceCards = buildDashboardIntelligenceCards(intelligenceFeed.items)

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

buildDashboardIntelligenceCards([]) returns a synthetic “empty” card, so intelligenceCards is never actually empty. That makes downstream logic (counts, conditional rendering, alerting) treat an empty feed as having 1 signal. Consider returning [] here and letting the caller render the empty state UI, or have this function optionally include/exclude the placeholder card.

Suggested change
const intelligenceCards = buildDashboardIntelligenceCards(intelligenceFeed.items)
const intelligenceCardsRaw = buildDashboardIntelligenceCards(intelligenceFeed.items)
const intelligenceCards =
intelligenceFeed.items.length === 0 ? [] : intelligenceCardsRaw

Copilot uses AI. Check for mistakes.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces a major redesign of the dashboard, aiming for a 'calmer' and more focused workspace. It also enhances the deadline radar with more sophisticated term matching. The changes are extensive, especially on the frontend, with a complete rewrite of the main dashboard page and significant refactoring of the topic workflow component. New APIs and types for 'dashboard intelligence' are also added.

My review focuses on improving code quality and maintainability. I've identified some areas for improvement, including removing unused code and redundant API fields in the backend, and addressing potential issues with hardcoded strings and unstable keys in the React components on the frontend. Overall, this is a significant and well-structured feature addition.

Comment on lines 355 to 374
conf_keywords = {
str(k).strip().lower() for k in (item.get("keywords") or []) if str(k).strip()
}
conf_terms = _collect_conference_deadline_terms(item)

matched_tracks: List[Dict[str, Any]] = []
for track in tracks:
track_id = int(track.get("id") or 0)
if track_id <= 0:
continue
overlap = sorted(conf_keywords & track_tokens.get(track_id, set()))
overlap = sorted(conf_terms & track_tokens.get(track_id, set()))
if overlap:
matched_tracks.append(
{
"track_id": track_id,
"track_name": str(track.get("name") or ""),
"matched_keywords": overlap,
"matched_terms": overlap,
}
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There are a couple of issues here:

  1. The conf_keywords variable is calculated on lines 355-357 but is not used anywhere. It can be removed.
  2. The response dictionary on lines 368-373 includes both matched_keywords and matched_terms with the same value (overlap). This is redundant. Since the frontend is being updated to prefer matched_terms, consider removing the matched_keywords field to keep the API clean. This would be a breaking change, but since this is a feature PR, it might be acceptable.
        conf_terms = _collect_conference_deadline_terms(item)

        matched_tracks: List[Dict[str, Any]] = []
        for track in tracks:
            track_id = int(track.get("id") or 0)
            if track_id <= 0:
                continue
            overlap = sorted(conf_terms & track_tokens.get(track_id, set()))
            if overlap:
                matched_tracks.append(
                    {
                        "track_id": track_id,
                        "track_name": str(track.get("name") or ""),
                        "matched_terms": overlap,
                    }
                )

Comment on lines +87 to +92
function getGreeting(): string {
const hour = new Date().getHours()
if (hour < 12) return "早上好"
if (hour < 18) return "下午好"
return "晚上好"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This function, and many others in this file, contain hardcoded UI strings (e.g., "早上好"). This makes the application difficult to maintain and internationalize. It's a best practice to extract UI strings into a dedicated localization system (e.g., using a library like next-intl or react-i18next). This comment applies to the entire file.

<TonePill tone={getLaneTone(nowItems)}>{nowItems.length} 项</TonePill>
</div>
<div className="mt-3 space-y-2">
{nowItems.map((item, index) => renderLaneItem(item, `now-${index}`))}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using the index as a key for list items (now-${index}) is an anti-pattern in React, especially for lists that can be re-ordered or have items added/removed. This can lead to performance issues and bugs with component state. The title property of LaneItemData seems to be unique enough to be used as a stable key. The same issue exists on line 724 for laterItems.

Suggested change
{nowItems.map((item, index) => renderLaneItem(item, `now-${index}`))}
{nowItems.map((item) => renderLaneItem(item, `now-${item.title}`))}

Comment on lines +1993 to +2017
{queryItems.map((query, index) => (
<div key={`${index}-${query}`} className="flex items-center gap-2 rounded-2xl border border-slate-200 bg-slate-50/80 px-3 py-2">
<span className="flex size-7 shrink-0 items-center justify-center rounded-full bg-indigo-50 text-xs font-semibold text-indigo-600">
{index + 1}
</span>
<Input
value={query}
onChange={(event) => updateQuery(index, event.target.value)}
placeholder={compact ? "输入主题、问题或线索" : "Enter a topic, problem, or question"}
className="h-9 border-none bg-transparent px-0 text-sm shadow-none focus-visible:ring-0"
/>
{queryItems.length > 1 ? (
<Button
type="button"
variant="ghost"
size="icon"
className="size-8 shrink-0 rounded-full text-slate-400 hover:bg-white hover:text-rose-600"
onClick={() => removeQuery(index)}
>
<XIcon className="size-4" />
</Button>
) : null}
</div>
))}
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using index as part of the key for the list of query inputs is problematic. When a user edits a query, the key ${index}-${query} changes, causing React to unmount and remount the Input component, which leads to loss of focus. A better approach is to use a stable, unique ID for each query item. This can be achieved by changing the queryItems state to hold objects with an ID and a value, e.g., { id: number; value: string }.

You would need to update the useState for queryItems, and the addQuery, removeQuery, and updateQuery functions to handle this new state structure. For example:

const [queryItems, setQueryItems] = useState(() => 
  (initialQueries?.length ? initialQueries : DEFAULT_QUERIES).map((q, i) => ({ id: Date.now() + i, value: q }))
);

function addQuery() {
  setQueryItems(prev => [...prev, { id: Date.now(), value: "" }]);
}

function updateQuery(id: number, value: string) {
  setQueryItems(prev => prev.map(item => item.id === id ? { ...item, value } : item));
}

function removeQuery(id: number) {
  setQueryItems(prev => prev.length > 1 ? prev.filter(item => item.id !== id) : prev);
}

// in the render:
{queryItems.map((item) => (
  <div key={item.id} ...>
    <Input
      value={item.value}
      onChange={(event) => updateQuery(item.id, event.target.value)}
      ...
    />
    ...
  </div>
))}

This is a more robust way to handle dynamic lists of inputs.

@jerry609
jerry609 force-pushed the feat/dashboard-calm-workspace branch from a0e4c94 to 45a6d0e Compare March 11, 2026 06:59
@jerry609
jerry609 merged commit a641dae into dev Mar 11, 2026
4 checks passed
@jerry609
jerry609 deleted the feat/dashboard-calm-workspace branch March 12, 2026 03:08
jerry609 added a commit that referenced this pull request Mar 13, 2026
* fix: validate studio output dirs and add p2c module design docs

:wq

* feat(PaperToContext): M3
#140
Closes #140

* feat(p2c): implement ContextEngineBridge to inject user context into extraction Related to #157

* activate paper-scope memory read/write path. Raletd to #158

* fix(p2c): address Gemini code review issues from PR. Related to #157

* fix(p2c): address Gemini code review issues. Related to #158

* fix(p2c): sanitize XML tag content to prevent tag-escape prompt injection

* feat(memory): add FTS5 full-text search and sqlite-vec hybrid search. Related to #161

* feat(p2c): persist CodeMemory experiences to SQLite. Related to #162

* address Gemini code review issues from PR #224 and #225

* fix(memory): address Gemini code review issues from #153 epic audit

P0 fixes:
- Replace unbounded daemon threads with ThreadPoolExecutor(max_workers=2)
  for embedding writes; atexit + close() ensure graceful shutdown so
  in-flight embeddings are not lost on process exit
- Restore apprise>=1.9.0 and feedgen>=1.0.0 removed in epic branch,
  which would have broken Epic #179 push/RSS features on merge

P1 fixes:
- _escape_fts: replace double-quote-only escaping with a whitelist regex
  [A-Za-z0-9_+-] so FTS5 operators (*, NEAR, NOT, ^) cannot alter query
  semantics; empty queries now short-circuit to []
- _hybrid_merge: skip items with None/invalid id instead of defaulting
  to id=0, preventing silent score collisions across unrelated records
- ReproExperienceStore: add application-level dedup check + UNIQUE
  constraint (paper_id, pattern_type, content) + IntegrityError fallback
  to prevent duplicate experiences from accumulating across retries

Migration:
- 0022_repro_experience_dedup: adds uq_repro_exp_paper_type_content
  unique constraint to existing repro_code_experience table

Tests: 47 unit tests pass (+3 new tests covering the fixes above)

* fix: harden repro experience isolation and wire persistence into repro pipeline

Add user-scoped isolation for repro_code_experience and enforce dedup semantics with migration 0022_repro_experience_dedup.

Inject ReproExperienceStore through ReproAgent/Orchestrator/CodingAgent/GenerationNode and propagate user_id/pack_id in generation, verification, and debugging persistence paths.

Update /api/gen-code to accept user_id and extend unit tests for user isolation and persistence behavior.

* feat(memory): introduce memory decay mechanism (#163)

Add decay-aware scoring that combines relevance (confidence), recency
(exponential decay with 90-day half-life), and usage frequency to
re-rank search results. New memories default to expires_at = created_at
+ 365 days. search_memories() now auto-touches usage on hits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memory): add cross-track batch search (#164)

Add search_memories_batch() that queries multiple scope_ids in a single
SQL call, eliminating the N+1 loop in build_context_pack(). Engine now
uses this batch method for cross-track memory retrieval.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(context): implement layered context loading (#165)

Refactor build_context_pack() into 4 layer methods:
- Layer 0: user profile (cached with 5-min TTL, ~200 tokens)
- Layer 1: track context — tasks/milestones (~500 tokens)
- Layer 2: query-relevant + cross-track memories (~1000 tokens)
- Layer 3: paper-scoped memories (on-demand)

Return value adds context_layers metadata while remaining fully
backward-compatible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(memory): align decay with OpenClaw patterns

- Use standard ln(2)/halfLifeDays lambda formula (matches OpenClaw
  temporal-decay.ts:toDecayLambda)
- Default half-life lowered to 30 days (was 90, now matches OpenClaw)
- Evergreen memories (global scope, preference kind) are immune to
  recency decay (inspired by OpenClaw isEvergreenMemoryPath)
- Add _to_decay_lambda() and _is_evergreen_memory() helpers
- Expand tests for lambda math, half-life precision, and evergreen logic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(context): isolate layer0 cache and touch batch hits (#236)

* feat(memory): upgrade batch retrieval with hybrid and MMR options (#237)

* feat(context): add embedding fallback chain and token guard config (#238)

* fix(memory): bound batch hybrid candidates by scope_ids

* docs: update README with macOS python3 tips

* docs: update README with more badges

* docs: update README with deleting extra badges

* feat(search): add offline retrieval benchmark harness

Add a deterministic retrieval benchmark fixture, scorer, CLI, docs, and CI smoke gate for PaperSearchService.\n\nCloses #284\nRefs #283

* feat(context): add offline context-engine benchmark

Add deterministic fixtures, scoring, CLI, and smoke coverage for layered assembly, token guard, and advisory routing in ContextEngine.\n\nCloses #286\nRefs #283

* feat(memory): add scope isolation acceptance bench

Add an offline scope-isolation benchmark for memory retrieval paths, extend the metric collector with cross-user and cross-scope leak rates, and wire the new check into CI.\n\nCloses #285\nRefs #283

* feat(memory): add offline injection robustness detector

Add a deterministic prompt-injection pattern detector, labeled offline fixtures, an acceptance benchmark, and CI coverage for Injection Robustness L1.\n\nCloses #287\nRefs #283

* feat(memory): add offline performance benchmark harness

Add a deterministic synthetic benchmark for memory search latency baselines across 10k/100k/1M scales, plus docs and smokeable unit coverage.\n\nCloses #288\nRefs #283

* feat: add ROI benchmark for repro memory

Closes #289

Refs #283

* docs: add MemoryBench epic completion report

Refs #283

* docs: add runtime memory benchmark report

Refs #283

* Docs: update README with our new name (#290)

* docs: update README with macOS python3 tips

* docs: update README with more badges

* docs: update README with deleting extra badges

* docs: update README with new god name

---------

Co-authored-by: 林杰 <linjie@linjiedeMacBook-Air.local>
Co-authored-by: 林杰 <linjie@v8d1ef64c.dip.tu-dresden.de>
Co-authored-by: 林杰 <linjie@v8d1ef43e.dip.tu-dresden.de>
Co-authored-by: 林杰 <linjie@v8d1ef6c5.dip.tu-dresden.de>

* Fix: show friendly error when backend is unreachable (#291)

* docs: update README with macOS python3 tips

* docs: update README with more badges

* docs: update README with deleting extra badges

* docs: update README with new god name

---------

Co-authored-by: 林杰 <linjie@linjiedeMacBook-Air.local>
Co-authored-by: 林杰 <linjie@v8d1ef64c.dip.tu-dresden.de>
Co-authored-by: 林杰 <linjie@v8d1ef43e.dip.tu-dresden.de>
Co-authored-by: 林杰 <linjie@v8d1ef6c5.dip.tu-dresden.de>

* feat: improve memory ROI and effectiveness benchmarks

* fix: avoid importing missing data template in main

* fix: stabilize live memory roi benchmark

* feat: expand multi-session memory effectiveness benchmark

* feat: implement MemoryBench evaluation suite with 4 bench suites

Add comprehensive memory module evaluation aligned with LongMemEval
(ICLR 2025), LoCoMo (ACL 2024), Mem0, and Letta benchmarks.

- Retrieval Bench v2: IR metrics (Recall@5=0.873, MRR@10=0.731, nDCG@10=0.747)
  with 40 annotated queries across 5 question types and 5 memory dimensions
- Scope Isolation + CRUD: zero-leak verification across user x scope matrix,
  Mem0-aligned CRUD lifecycle (add/update/delete/dedup)
- Context Extraction: L0-L3 layer completeness, precision, token budget guard,
  TrackRouter accuracy (100%), graceful degradation
- Injection Robustness L1: offline pattern detection (0% pollution, 0% FP)
- Fixture dataset: 45 memories (2 users), 12 injection patterns
- Testing documentation with methodology, validity analysis, and results

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add MemoryBench quantitative results to README

Add evaluation results section with metrics from 4 bench suites:
- Retrieval quality (Recall@5=0.873, MRR@10=0.731, nDCG@10=0.747)
- Scope isolation + CRUD lifecycle (zero leaks, all CRUD pass)
- Context extraction (100% precision, 100% router accuracy)
- Injection robustness (0% pollution, 0% false positive)

Includes LoCoMo question-type breakdown and run instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(AgentSwarm): add Claude/Codex workflow, workspace persistence, and human review UX (#296)

* feat(AgentSwarm): add Claude/Codex workflow, workspace persistence, and human review UX

- 添加 /api/agent-board 路由和 Swarm Commander/Dispatcher 基础架构

- 将生成的任务文件持久化到已配置的工作区

- 在工作区中为每个任务生成用户审核文档(reviews/<任务>-user-review.md)

- 添加代理看板 UI,包含看板、任务详细日志和人工审核操作

- 要求“全部运行”任务设置工作区,并添加 VS Code 打开操作

- 实现 Studio 存储和 SSE 任务的更新/插入/同步行为

- 为路由流程、持久化和超时处理添加单元/功能测试

- 更新 Studio 布局、PostCSS 配置、后端 URL 助手和锁定文件

Closes #197

* (fix)修改AI review问题

* refactor: share research fetch helpers (#295)

Co-authored-by: 林杰 <linjie@v8d1ef6c5.dip.tu-dresden.de>

* feat: add research/yearCombobox. Realted to #297

* refactor(research): dedupe fetch helpers across Research pages; fix Radix popover import; add @radix-ui/react-popover dep

* fix(web): move @radix-ui/react-popover to dependencies

* fix(research): keep track list order stable across activation

* refactor(research): share stable track merge helper

* fix(research): make paper feedback togglable

* feat(research): hide 'Open Discovery Workspace' behind feature flag

* feat(research): gate track memory button behind feature flag (#333)

* feat(research): gate track memory button behind feature flag

* fix(research): avoid reactivating already active track

* ci(vercel): add auto deploy workflow for dev branch

* feat: calm dashboard workspace (#334)

* feat: harden search and connector infrastructure (#339)

* refactor(infra): unify async request layer for connectors

Implements issue #262 by moving Arxiv/OpenAlex/PapersCool connectors onto the shared async transport with retry support, updating async call sites, and adding focused tests.

* perf(infra): batch OpenAlex ID lookups

Implements issue #267 by replacing per-ID OpenAlex work fetches with batched filter queries and adds focused coverage for the batched path.

* refactor(infra): unify Semantic Scholar client stack

Implements issue #266 by routing both the shared mixin and the scholar-tracking agent through the same SemanticScholarClient surface, removing the duplicated legacy API client path, and adding focused unification tests.

* feat(infra): harden SSE transport handling

Implements issue #263 by moving heartbeat, timeout, cancellation cleanup, and X-Accel-Buffering handling into the shared SSE wrapper and switching the streaming routes onto the common response helper with regression coverage.

* fix(infra): bound ARQ jobs and reuse event log

Implements issue #268 by adding timeout/max_tries metadata to worker functions, reusing the SqlAlchemyEventLog singleton inside the worker module, and covering both behaviors with focused tests.

* feat(search): add three-tier paper deduplicator (DOI/arxiv_id/rapidfuzz)

Replaces the identity-key-only dedup in PaperSearchService._fuse_with_rrf()
with a dedicated PaperDeduplicator that matches across DOI, arxiv_id (version-
stripped), and fuzzy title similarity via rapidfuzz. Merged papers accumulate
the best metadata (highest citations, longest abstract, union of identities).

Closes #317

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(search): prevent conflicting identity dedup merges

Refs #317

* fix(embeddings): add CJK character support to hash embedding tokenizer

Extends HashEmbeddingProvider regex to include CJK Unified Ideographs
(U+4E00–U+9FFF) and Extension A (U+3400–U+4DBF), enabling proper
embedding of Chinese text.

Closes #276

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(embeddings): extend hash tokenizer beyond Han-only CJK

Refs #276

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix(research): restore feedback track ux on current dev (#341)

* refactor(research): dedupe fetch helpers across Research pages; fix Radix popover import; add @radix-ui/react-popover dep

* fix(web): preserve item order in research tracks selection

Closes #304

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(web): remove unused components

Closes #305

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web): keep active research track visible

Refs #304

* fix(research): align paper feedback toggles with persisted state

Refs #324

* fix(web): add missing @radix-ui/react-popover dependency

Research page crashed with "Module not found: Can't resolve
'@radix-ui/react-popover'" because SearchBox.tsx imports popover.tsx
which depends on this package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(research): restore feedback track ux on current dev

---------

Co-authored-by: 林杰 <linjie@v8d1ef6a5.dip.tu-dresden.de>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web): resolve DeepCode Studio page issues

* fix(repro): improve memory and workflow correctness

* feat: add intelligence radar backend

* fix(api): block cross-user intelligence feed access

* fix(intelligence): avoid thread-unsafe refresh races

* refactor: enforce alembic-only store initialization

* fix(db): bootstrap sqlite schemas for lazy stores

* fix(stores): align ports with store interfaces

* fix(stores): align remaining port contracts

* fix(api): harden request boundaries and settings handling

* fix(api): stop trusting spoofable forwarded hosts

* fix(api): gate studio code execution by default

* fix(api): stream request-size checks safely

* feat(export): add Obsidian filesystem exporter

* feat(cli): add Obsidian export command

* feat(obsidian): finish configurable vault export workflow (#348)

* refactor(web): move workflow workbench out of dashboard

* ci(vercel): use --preview flag for dev deploy

* fix(ci): remove invalid Vercel preview flag

* fix(ci): keep Vercel secrets free of inline comments

* refactor: share candidate search boundary and simplify dashboard

* refactor(api): split paperscool search curate and ingest

* refactor(web): flatten dashboard brief snapshot

* refactor(web): reduce dashboard brief visual noise

* refactor(web): feature top dashboard signals

* fix(obsidian): harden export follow-ups

* fix(obsidian): tighten review follow-ups

* feat(web): add Obsidian handoff to Research workspace (#352)

* feat(web): add Obsidian handoff to Research workspace

* fix(web): address obsidian workspace review feedback

* feat: ship track-centric research context stack (#356)

* feat(api): add track context read model service

* feat(api): expose consolidated track context endpoint

* refactor(web): migrate research page to track context endpoint

* refactor(memory): wrap track-scoped memory access

* chore: document track-centric research model and stabilize tests

* docs: refresh readme screenshots

* fix(deps): align package manifests with runtime imports

* docs: refresh email push screenshot

* feat(research): close citation graph and obsidian export gaps (#360)

* feat(obsidian): add bidirectional vault sync

* fix(paper): improve saved papers table layout

* feat(openclaw): add paperbot plugin bridge

* fix(obsidian): address sync review feedback

* feat(web): flatten dashboard action bands

* refactor(web): condense dashboard next-up panel

* refactor(web): simplify dashboard around recommendations

* refactor(web): simplify dashboard surface and workflow copy

* feat(web): add dashboard queue actions

* fix(web): harden dashboard queue links and brief parsing

* fix(paper): unify unsave with feedback API

* fix(paper): scope saved papers per track

* fix: unblock dashboard build and e2e

* ci: add vercel pr preview automation

* fix: repair vercel preview workflow setup

* fix: run vercel build from repo root

* fix: skip preview smoke without bypass secret

* feat(auth): add multi-user authentication foundation. Related to #151

- Add User domain model and SQLAlchemy UserModel with soft-delete support
- Add SqlAlchemyUserStore with email/GitHub user CRUD, password auth, reset tokens
- Add JWT signing/verification (python-jose), bcrypt password hashing
- Add FastAPI auth dependencies: get_user_id (optional fallback) and get_current_user (strict)
- Add /api/auth routes: register, login, github/exchange, me, forgot/reset-password
- Add Alembic migrations for users and password_reset_tokens tables
- Add AUTH_OPTIONAL env var for gradual migration from legacy 'default' user
- Fix account lifecycle bugs: reactivate on OAuth re-login, reject inactive on password login
- Add auth API tests

* fix(auth): address code review feedback on PR #365

* feat(document): add explicit evidence indexing pipeline

* docs(benchmark): define document evidence eval contract

* feat(benchmark): add document evidence eval scaffold

* fix(api): restore py39 auth compatibility after dev rebase

* chore(logging): surface cleanup and FTS5 failures

* fix(paper): refine saved filters and cleanup code

* fix(paper): refine paper context cleanup and year filter

* feat(eval): support dedicated embedding benchmark providers

* feat(settings): add embedding endpoint configuration

* refactor(settings): align embedding endpoint ux with cc-switch

* refactor(settings): simplify embedding endpoint panel

* refactor(settings): tighten embedding layout on wide screens

* feat(studio): refine paper gallery icon animation and context
  workspace layout

* ci: disable native vercel git deploys

* docs: restore master demo gallery assets

* fix: unblock ci for merge-dev-into-master

* fix: address codeql alerts

* fix: harden agent board workspace path validation

---------

Co-authored-by: boyu <oor2020@163.com>
Co-authored-by: WenjingWang <jingnvx@outlook.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: 林杰 <linjie@linjiedeMacBook-Air.local>
Co-authored-by: 林杰 <linjie@v8d1ef64c.dip.tu-dresden.de>
Co-authored-by: Linjie-top <linjie666z@gmail.com>
Co-authored-by: 林杰 <linjie@v8d1ef43e.dip.tu-dresden.de>
Co-authored-by: 林杰 <linjie@v8d1ef6c5.dip.tu-dresden.de>
Co-authored-by: 林杰 <linjie@v8d1ef6a5.dip.tu-dresden.de>
Co-authored-by: 林杰 <linjie@v8d1ef4ea.dip.tu-dresden.de>
Co-authored-by: 林杰 <linjie@v8d1ef41f.dip.tu-dresden.de>
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