Archon icon indicating copy to clipboard operation
Archon copied to clipboard

feat: agentic workflow implementation

Open aeiouboy opened this issue 3 months ago • 1 comments

Implementing agentic workflow features with document viewer enhancements and improved UI components

Summary by CodeRabbit

  • New Features
    • Added a toggle to switch between beautified and raw JSON views in the document viewer (beautified by default).
    • Left pane now displays “Viewing X documents” with a dynamic count.
  • Style
    • Removed the migration warning banner.
    • Updated left pane header from “Documents (Read-Only)” to “Documents”.
    • Improved empty states: “No documents found” for filtered results; “No documents in this project” when none exist.
    • Layout refinements for better scrolling and full-height panels.

aeiouboy avatar Sep 07 '25 13:09 aeiouboy

Walkthrough

Removes migration warning banner and updates layout/text in DocsTab. Enhances DocumentViewer with a JSON beautify toggle, defaulting to beautified view, including recursive structured rendering and a raw JSON fallback. Empty-state messages refined, and document count added to the left pane header. No public interfaces changed.

Changes

Cohort / File(s) Summary of Changes
DocsTab UI cleanup and empty-states
archon-ui-main/src/features/projects/documents/DocsTab.tsx
Removed migration banner; adjusted layout sizing (min-h-0, h-full); header text from “Documents (Read-Only)” to “Documents”; added “Viewing X documents” label; improved empty-state messages for search/no search; no-op delete remains; viewer behavior unchanged.
DocumentViewer JSON beautify toggle and renderer
archon-ui-main/src/features/projects/documents/components/DocumentViewer.tsx
Added beautified JSON rendering with toggle (default on); introduced hasJsonContent and recursive type-aware renderValue; sections per top-level key; fallback to pretty-printed raw JSON; imports for state and icon; public API unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant DV as DocumentViewer
  participant State as isBeautified (state)

  U->>DV: Click Beautify/Raw toggle
  DV->>State: Toggle value
  alt JSON content available
    DV->>DV: renderContent()
    opt isBeautified = true
      Note right of DV: Render structured sections<br/>via recursive renderValue
    end
    opt isBeautified = false
      Note right of DV: Render pretty-printed raw JSON
    end
  else Non-JSON content
    DV->>DV: Use existing string/markdown/text path
  end
  DV-->>U: Updated viewer displayed

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • coleam00/Archon#567 — Also modifies DocsTab and DocumentViewer in the project documents UI, suggesting overlapping or sequential changes to the same components.

Poem

A nibble of JSON, a toggle to show,
I hop through keys where the pretty prints grow.
Docs line up neatly, no banner in sight—
“Viewing X docs,” a concise little light.
With ears perked high and a code-colored grin,
I beautify bits—let the tidy begin! 🐇✨

[!WARNING]

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

✨ Finishing Touches
  • [ ] 📝 Generate Docstrings
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

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.

coderabbitai[bot] avatar Sep 07 '25 13:09 coderabbitai[bot]

Thank you for this contribution @aeiouboy The documents feature is under migration, and therefore i cant merge this PR, feel free to contribute in other parts of the application or join the discussion about the Documents migration!

Wirasm avatar Sep 16 '25 10:09 Wirasm