• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jcubic / 10xDevs / 18621254025

18 Oct 2025 09:32PM UTC coverage: 19.473% (+0.2%) from 19.299%
18621254025

push

github

jcubic
replace History API with Next.js routes system

77 of 109 branches covered (70.64%)

Branch coverage included in aggregate %.

0 of 33 new or added lines in 5 files covered. (0.0%)

118 existing lines in 9 files now uncovered.

462 of 2659 relevant lines covered (17.37%)

2.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

3.23
/src/components/notes/MainNotesLayout.tsx
1
import type { Note } from '@prisma/client';
1✔
2
import type { NoteTreeNode } from '@/types/tree';
3
import { getNotes } from '@/app/actions/notes';
×
4
import { NotesProvider } from './NotesContext';
×
5
import MainNotesClient from './MainNotesClient';
×
6
import styles from './MainNotesLayout.module.css';
×
7

8
interface MainNotesLayoutProps {
9
  selectedNoteId?: number;
10
  lineNumber?: number;
11
}
12

13
// Convert Prisma Note to NoteTreeNode
14
function convertNoteToTreeNode(note: Note): NoteTreeNode {
×
15
  return {
×
16
    id: note.id,
×
17
    name: note.name,
×
18
    selected: false,
×
19
    data: {
×
20
      content: note.content, // Preserve null for example notes
×
21
      dirty: false
×
22
    }
×
23
  };
×
UNCOV
24
}
×
25

26
export default async function MainNotesLayout({
×
27
  selectedNoteId,
×
28
  lineNumber
×
UNCOV
29
}: MainNotesLayoutProps) {
×
30
  // Single fetch - get all notes once
UNCOV
31
  const notes = await getNotes();
×
32

33
  // Convert to TreeNodes
UNCOV
34
  const treeNodes: NoteTreeNode[] = notes.map(convertNoteToTreeNode);
×
35

36
  return (
×
37
    <div className={styles.layout}>
×
38
      <NotesProvider
×
39
        initialNotes={treeNodes}
×
UNCOV
40
        initialSelectedNoteId={selectedNoteId || null}
×
41
      >
42
        <MainNotesClient lineNumber={lineNumber} />
×
43
      </NotesProvider>
×
UNCOV
44
    </div>
×
45
  );
UNCOV
46
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc