Skip to content

Conversation

oliursahin
Copy link
Collaborator

@oliursahin oliursahin commented May 10, 2025

User description

What did you ship?

Fixes:

  • #XXX (GitHub issue number)
  • MAR-XXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Checklist:

  • I have self-reviewed the code (A decent size PR without self-review might be rejected)
  • I pinky swear that my codes gonna work as I have testing every possible scenario.
  • I ignored Coderabbit suggestion because it does not make any sense.
  • I took Coderabbit suggestion under consideration as some of it makes sense.
  • I have commented my code, particularly in hard-to-understand areas.

OR:

  • shut up and let me cook.

Important

This pull request updates server configurations, environment settings, and enhances frontend UI components, including new pages and improved notification handling.

  • Backend:
    • index.js: Server now listens on all interfaces (0.0.0.0).
    • environment.loader.js: Default PORT changed from 8080 to 3000.
    • package.json: Updated project name and repository URL.
  • Frontend:
    • next.config.ts: Disabled type checking and ESLint during production builds.
    • agenda/page.tsx: Added DailyNotes component and commented out CalendarBlock.
    • objects/page.tsx: New page for displaying all objects with error boundary and suspense.
    • journal/page.tsx: New journal page with JournalPage component.
    • editor.tsx: Updated editor to use novel package with custom extensions.
    • block-context.tsx: Added support for overdue items in context.
    • use-objects.ts: Enhanced optimistic updates and error handling for object mutations.
  • UI Components:
    • agenda-list-items.tsx: Added overdue items section.
    • notification.tsx: New notification component with global access.
    • test-toast.tsx: Component to test toast notifications.

This description was created by Ellipsis for fcee865. You can customize this summary. It will automatically update as commits are pushed.


CodeAnt-AI Description

  • Added a comprehensive daily notes feature with a calendar UI, supporting navigation, selection, and editing of daily notes, including API and localStorage integration.
  • Introduced agenda list components to display today's and overdue scheduled objects, with drag-and-drop, completion toggling, and expanded views.
  • Added a new objects page and updated the sidebar to replace the agent route with objects, including icon and navigation changes.
  • Implemented a new journal system with tabbed navigation, entry creation, and history, along with dedicated components for journal entry editing and management.
  • Enhanced optimistic updates and error handling for object mutations, with user feedback via toast notifications.
  • Improved error handling for calendar event fetching and updated object fetching logic to support overdue items.
  • Updated Next.js and ESLint configurations to relax build checks and strict mode, and fixed build errors by disabling problematic rules.
  • Changed backend server to listen on all interfaces, updated default port, fixed Redis environment variable assignment, and rebranded backend metadata.
  • Added reusable notification components and a test component for toast notifications.
  • Improved editor layout, added a slash command for todo/task lists, and updated task list styles for better UX.

This PR introduces major enhancements to the agenda, journal, and object management features, significantly improving the user experience with new UI components, robust error handling, and better feedback mechanisms. It also includes important configuration and backend updates to support these frontend changes and ensure smoother deployments.


Changes walkthrough

Relevant files
Enhancement
16 files
daily-notes.tsx
Add DailyNotes component with calendar and editor integration   

apps/web/src/components/blocks/daily-notes/daily-notes.tsx

  • Introduced a new DailyNotes component with a calendar UI for selecting
    and editing daily notes.
  • Supports fetching and saving journal entries via API and localStorage
    fallback.
  • Includes a custom calendar grid, navigation between days, and visual
    indicators for days with entries.
  • Integrates with a rich text editor for note content.
  • +543/-0 
    agenda-list-items.tsx
    Add AgendaListItems for today's and overdue scheduled objects   

    apps/web/src/components/blocks/list/agenda-list-items.tsx

  • Added AgendaListItems component to display today's and overdue
    scheduled objects.
  • Supports drag-and-drop, completion toggling, and expanded view for
    each item.
  • Visual distinction for overdue items and integration with source
    icons.
  • +180/-0 
    agenda-list.tsx
    Add AgendaListBlock component for agenda context                             

    apps/web/src/components/blocks/list/agenda-list.tsx

  • Introduced AgendaListBlock component to wrap and provide context for
    agenda list items.
  • Handles drag state and context provider for agenda view.
  • +26/-0   
    page.tsx
    Update agenda page to use DailyNotes and AgendaListBlock             

    apps/web/src/app/(routes)/agenda/page.tsx

  • Integrated the new DailyNotes and AgendaListBlock components into the
    agenda page.
  • Commented out the calendar block for future use.
  • +11/-5   
    page.tsx
    Add objects page to display all objects with error handling       

    apps/web/src/app/(routes)/objects/page.tsx

  • Added a new page to display all objects with error boundary and
    suspense loading.
  • Uses inbox array type for listing objects.
  • +28/-0   
    page.tsx
    Add journal page route with JournalPage component                           

    apps/web/src/app/journal/page.tsx

  • Added a new journal route that renders the JournalPage component.
  • +5/-0     
    journal-entry.tsx
    Add JournalEntry component for editing journal entries                 

    apps/web/src/components/journal/journal-entry.tsx

  • Introduced JournalEntry component for creating and editing individual
    journal entries.
  • Includes date selection, textarea for content, and save functionality
    with toast notifications.
  • +122/-0 
    journal-page.tsx
    Add JournalPage component with tabbed journal management             

    apps/web/src/components/journal/journal-page.tsx

  • Added JournalPage component to manage journal entry tabs, history, and
    today's entry.
  • Fetches journal entries, supports creating new entries, and displays
    journal history.
  • +197/-0 
    app-sidebar.tsx
    Update sidebar to use Objects route and icon                                     

    apps/web/src/components/sidebar/app-sidebar.tsx

  • Replaced the sidebar "Agent" route with "Objects" and updated the
    icon.
  • Adjusted navigation and active state logic for the new route.
  • +11/-8   
    notification.tsx
    Add reusable notification and notification container components

    apps/web/src/components/ui/notification.tsx

  • Introduced a reusable notification component and container for
    displaying success, error, and info messages.
  • Supports global notification triggering via window.showNotification.
  • +104/-0 
    objects.ts
    Update getTodayObjects to include overdue objects                           

    apps/web/src/actions/objects.ts

  • Modified getTodayObjects to return both today's and overdue objects.
  • Ensured returned arrays are always defined.
  • +5/-2     
    block-context.tsx
    Enhance block context to support overdue items                                 

    apps/web/src/contexts/block-context.tsx

  • Updated block context to support both items and overdueItems for
    agenda/today views.
  • Adjusted logic to handle different data structures for inbox and today
    arrays.
  • +41/-15 
    use-objects.ts
    Enhance object mutation hooks with optimistic updates and
    notifications

    apps/web/src/hooks/use-objects.ts

  • Enhanced optimistic updates and error handling for create and delete
    object mutations.
  • Added toast notifications for success and error cases.
  • Improved cache update logic for both inbox and today queries.
  • +148/-14
    editor.tsx
    Adjust editor layout for full width usage                                           

    apps/web/src/components/editor/editor.tsx

  • Updated editor to use full width and improved class names for layout
    consistency.
  • +2/-2     
    slash-command.ts
    Add slash command for todo/task list in editor                                 

    apps/web/src/components/editor/slash-command.ts

  • Added a slash command for inserting todo/task lists with checkboxes.
  • +10/-0   
    editor.css
    Update task list checkbox and completed text styles                       

    apps/web/src/components/editor/editor.css

  • Changed checked task list checkbox color to blue.
  • Updated completed task text color and removed line-through style.
  • +4/-5     
    Tests
    1 files
    test-toast.tsx
    Add test component for toast notifications                                         

    apps/web/src/components/test-toast.tsx

    • Added a test component for triggering toast notifications.
    +21/-0   
    Bug fix
    3 files
    calendar.ts
    Enhance calendar event fetching with robust error handling         

    apps/web/src/actions/calendar.ts

  • Improved error handling in getEventsByDate to return an empty array on
    failure instead of throwing.
  • Added logging for API errors.
  • +15/-7   
    extentions.ts
    Fix task item extension configuration for editor                             

    apps/web/src/components/editor/extentions.ts

  • Fixed onReadOnlyChecked configuration for task items to be a function.

  • +2/-0     
    environment.loader.js
    Change default port and fix Redis env var assignment                     

    apps/backend/src/loaders/environment.loader.js

  • Changed default server port from 8080 to 3000.
  • Fixed Redis environment variable assignment for REDIS_DB_NAME.
  • +2/-2     
    Configuration changes
    3 files
    next.config.ts
    Update Next.js config to relax build checks and strict mode       

    apps/web/next.config.ts

  • Disabled TypeScript build errors and ESLint errors during production
    builds.
  • Disabled React strict mode for development.
  • +12/-0   
    eslint.config.mjs
    Disable problematic ESLint rule for build stability                       

    apps/web/eslint.config.mjs

  • Disabled the @next/next/no-duplicate-head rule to fix build errors.
  • +6/-0     
    index.js
    Update server to listen on all interfaces                                           

    apps/backend/index.js

  • Updated server to listen on 0.0.0.0 to accept connections from any IP
    address.
  • Updated related comments for clarity.
  • +4/-4     
    Dependencies
    1 files
    package.json
    Add date-fns dependency for date utilities                                         

    apps/web/package.json

    • Added date-fns as a new dependency for date handling.
    +1/-0     
    Miscellaneous
    2 files
    index.js
    Update root route welcome message                                                           

    apps/backend/src/routers/index.js

    • Updated root route welcome message to "Welcome to sage".
    +1/-1     
    package.json
    Update backend package metadata to march branding                           

    apps/backend/package.json

  • Updated project name, author, and repository fields from "emptyarray"
    to "march".
  • +3/-3     
    💡 Usage Guide

    Checking Your Pull Request

    Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

    Talking to CodeAnt AI

    Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

    @codeant-ai ask: Your question here
    

    This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

    Retrigger review

    Ask CodeAnt AI to review the PR again, by typing:

    @codeant-ai: review
    

    Check Your Repository Health

    To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

    oliursahin and others added 30 commits April 28, 2025 17:28
    feat: imp date base journal
    feat: blue dots on notes under date
    feat: all the scheduled objects of that day
    chore: update default port from 8080 to 3000 and use nullish coalesci…
    Revert "chore: update default port from 8080 to 3000 and use nullish coalesci…"
    Fix: Update server to listen on 0.0.0.0 to accept connections from an…
    fix: replace nullish coalescing with logical OR for PORT env var fall…
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    size:XXL This PR changes 1000+ lines, ignoring generated files

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants