Skip to content

feat: restructure calendar app - #20

Merged
charlesponti merged 4 commits into
mainfrom
codex/calendar-restructure
Sep 18, 2026
Merged

charlesponti merged 4 commits into
mainfrom
codex/calendar-restructure

Conversation

@charlesponti

Copy link
Copy Markdown
Member

Summary

  • restructure the calendar app
  • remove deprecated iconkit usage
  • update workflows
  • allow OpenRouter postinstall scripts

This PR contains the three commits currently ahead of main.

Two commands (carousel form, clipboard download) over gallery-dl with browser-cookie auth, photos-only mode, and persistent failure diagnostics.
Copilot AI lite review requested due to automatic review settings September 18, 2026 15:12

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09aae3db5b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +279 to +282
for (const file of listFilesRecursive(outDir)) {
const ext = extensionOf(file);
if (VIDEO_EXTENSIONS.has(ext) || AUDIO_EXTENSIONS.has(ext)) {
rmSync(file);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restrict photo-only deletion to files from this download

When Photos Only is enabled, this recursively scans the entire selected output directory and removes every video or audio file, including files that existed before this invocation. Because the form permits selecting a broad directory such as ~/Downloads, downloading one carousel can permanently delete unrelated personal media; track the files created by this gallery-dl run or isolate each download before removing non-image outputs.

Useful? React with 👍 / 👎.

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.

🟡 Changes recommended

Critical compilation, runtime, asset, and file-deletion issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR restructures the Calendar CLI around a native Swift EventKit helper, adds a Raycast gallery-dl extension, removes deprecated IconKit artifacts, and updates tooling.

Changes:

  • Reworks Calendar packaging, helper implementation, and tests.
  • Adds the Raycast gallery-dl app and dependencies.
  • Removes IconKit compatibility and publishing artifacts.
  • Updates workspace configuration, documentation, lockfiles, and workflows.
File summaries
File Review summary
README.md Updates repository documentation. Nit (2 votes): Add raycast-gallery-dl to the workspace layout and tool index.
pnpm-workspace.yaml Allows OpenRouter install scripts.
pnpm-lock.yaml Updates workspace dependency resolution.
apps/raycast-gallery-dl/tsconfig.json Adds TypeScript configuration for the extension.
apps/raycast-gallery-dl/src/lib/gallery-dl.ts Downloader logic. Critical (3 votes): photosOnly can delete matching media from previous downloads or user files; limit removal to newly created files (lines 279/288).
apps/raycast-gallery-dl/src/download-clipboard.tsx Adds clipboard download command handling.
apps/raycast-gallery-dl/src/download-carousel.tsx Adds carousel download command handling.
apps/raycast-gallery-dl/README.md Documents the Raycast extension.
apps/raycast-gallery-dl/package.json Extension manifest and dependencies. Critical (1 vote): Icon path points to missing icon.png instead of assets/icon.png (line 6). Nit (1 vote): App is missing from the root README index (line 3). Moderate (1 vote): Node engine range is below the locked Raycast API requirement (line 133).
apps/raycast-gallery-dl/eslint.config.mjs Adds extension lint configuration.
apps/raycast-gallery-dl/.gitignore Adds extension ignore rules.
apps/imagekit/README.md Removes deprecated package documentation.
apps/iconkit/README.md Removes deprecated package documentation.
apps/iconkit/package.json Removes the deprecated compatibility package.
apps/iconkit/bin/iconkit.js Removes the deprecated executable.
apps/calendar/src/index.ts Updates CLI error handling. Moderate (1 vote): Successful Oclif exit flows still print an Error: line (line 11).
apps/calendar/package.json Updates native helper build paths.
apps/calendar/calendar-helper/Sources/CalendarHelper/main.swift Adds the EventKit helper. Critical (3 votes): eventIdentifier is optional where a String is required, preventing compilation (line 246). Critical (3 votes): String calendar indexes are not accepted, causing CALENDAR_NOT_FOUND (line 130). Moderate (1 vote): All-day end dates are formatted incorrectly (line 307). Moderate (1 vote): Invalid calendar indexes are silently ignored (line 296). Moderate (1 vote): Declined events are not excluded from freebusy results (line 282). Moderate (1 vote): CI lacks native build/request-response coverage (line 60). Moderate (2 votes): Documented local datetimes are rejected without a timezone (line 305). Moderate (2 votes): Negative --max values can trap or produce invalid counts (line 147). Critical (1 vote): Recursive JSONValue requires indirect for Swift compilation (line 4).
apps/calendar/calendar-helper/Package.swift Defines Swift helper package configuration.
apps/calendar/__tests__/cli.verify-import.test.js Updates the built CLI import path.
apps/calendar/__tests__/cli.integration.test.js Updates CLI integration expectations.
.mise.toml Pins Node and pnpm versions.
.gitignore Adds Python temporary-file exclusions.
.github/workflows/publish-iconkit.yml Removes the obsolete publishing workflow.
.github/workflows/publish-filekit.yml Adds publish concurrency control.
.claude/settings.local.json Adds local agent permissions. Nit (3 votes): This developer-specific settings file should remain untracked and ignored.
Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file

Suppressed comments (4)

apps/calendar/src/index.ts:15

  • Oclif uses an exit error with oclif.exit === 0 for successful help/version-style flows (the updated no-args test expects status 0), but this branch always prints an Error: line. Successful invocations will therefore report an error on stderr; only log the message for nonzero exit codes.
  if (typeof oclifExit === "number") {
    console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
    process.exitCode = oclifExit;
    return;
  }

apps/raycast-gallery-dl/package.json:3

  • The new raycast-gallery-dl workspace app is absent from the root README's app tree and table, which otherwise index the repository's apps. Add it to that index (or remove the app if it is not intended to ship) so the new package is discoverable.
  "name": "raycast-gallery-dl",

apps/raycast-gallery-dl/package.json:133

  • The package declares support for Node >=22.14.0, but the locked @raycast/api@2.4.1 dependency requires Node >=22.22.2. The current engine range therefore advertises unsupported environments; align it with the dependency or pin an API version compatible with 22.14.
    "node": ">=22.14.0"

apps/raycast-gallery-dl/src/lib/gallery-dl.ts:290

  • The returned image list is also built from the whole output directory, so the success toast reports all historical images as downloaded rather than only the files produced for this URL. Return only newly created files from this invocation.
  const images = listFilesRecursive(outDir)
    .filter((file) => IMAGE_EXTENSIONS.has(extensionOf(file)))
    .sort();
  • Files reviewed: 21/27 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

"name": "raycast-gallery-dl",
"title": "Gallery DL",
"description": "Download Instagram carousels and web galleries via gallery-dl",
"icon": "icon.png",
Comment on lines +279 to +283
for (const file of listFilesRecursive(outDir)) {
const ext = extensionOf(file);
if (VIDEO_EXTENSIONS.has(ext) || AUDIO_EXTENSIONS.has(ext)) {
rmSync(file);
videosRemoved++;
Comment thread .claude/settings.local.json Outdated
Comment on lines +4 to +5
"Bash(grep -rln \"modalities\\\\|buildPrompt\\\\|api/v1/images\\\\|OPENROUTER_API_KEY\" --include=\"*.ts\" --include=\"*.js\" /Users/charlesponti/Developer/infra/toolbox -not -path \"*/node_modules/*\")",
"Bash(npm view *)"
Comment thread README.md
│ ├── datpiff/
│ ├── imagekit/ # primary — replaces iconkit + photokit
│ ├── iconkit/ # compat shim for @ponti-studios/iconkit
│ ├── imagekit/ # primary (iconkit/photokit remain as binary aliases)
Track files present before gallery-dl runs so Photos Only only removes media created by the current download. Ignore local Claude settings and document the Raycast extension in the workspace inventory.
@charlesponti
charlesponti merged commit 227622b into main Sep 18, 2026
15 checks passed
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