Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xranx OpenContext IOS Ideas Service

From Leeroopedia
Knowledge Sources
Domains Idea_Journaling, iOS
Last Updated 2026-10-24 00:00 GMT

Overview

Ideas service for the iOS app, managing idea boxes, threads, and entries via the Expo filesystem with hidden markdown markers for entry delimitation.

Description

The ideas.js module in src-ios/services/ provides the full CRUD API for the iOS idea journaling feature. It manages idea boxes (create, rename, delete), threads (create, continue, delete, move between boxes), and entries (delete). Entries are delimited by hidden HTML comment markers ([//]: # (idea:id=... created_at=... is_ai=...)) within a single markdown thread file. The service handles image extraction from markdown content, box name sanitization, and legacy path migration (date-based paths without boxes).

Usage

Import the service functions in IdeasScreen.js to manage the ideas timeline.

Code Reference

Source Location

Signature

async function listBoxes() // → Array<string>
async function listThreads(boxName) // → Array<Thread>
async function createThread({ box, title, content, images }) // → Thread
async function continueThread({ threadPath, content, images }) // → Thread
async function deleteEntry({ threadPath, entryId }) // → Thread
async function deleteThread({ threadPath }) // → void
async function createBox(name) // → void
async function renameBox(oldName, newName) // → void
async function deleteBox(name) // → void
async function moveThread({ threadPath, targetBox }) // → Thread

Import

const { listThreads, createThread, continueThread, deleteEntry, listBoxes } = require('./services/ideas');

I/O Contract

Inputs

Name Type Required Description
box string No Idea box name (default "inbox")
title string Yes (create) Thread title
content string Yes Entry text content
images Array No Image references
threadPath string Yes Thread file path

Outputs

Name Type Description
Thread object { rel_path, title, entries, box }
Entry object { id, createdAt, text, isAI }

Usage Examples

Creating and Continuing Threads

const { createThread, continueThread, listThreads } = require('./services/ideas');

// Create a new idea thread
const thread = await createThread({
  box: 'inbox',
  title: 'Project Ideas',
  content: 'I should build a knowledge base app.'
});

// Continue with a new entry
await continueThread({
  threadPath: thread.rel_path,
  content: 'Actually, I want to use markdown.'
});

// List all threads in a box
const threads = await listThreads('inbox');

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment