[Feat] Publish sessions to Cloudflare Pages#49
Conversation
Signed-off-by: samzong <samzong.lu@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cb71a6da1
ℹ️ 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".
| config.share = Some(ShareConfig { | ||
| provider: PROVIDER_CLOUDFLARE_PAGES.to_string(), | ||
| project_name, | ||
| publish_dir: publish_dir.to_string_lossy().to_string(), |
There was a problem hiding this comment.
Store share directories as absolute paths
When recall share init is run with a relative --publish-dir or prompt value, this saves that relative path as-is. Later TUI publishes resolve it relative to whatever directory recall is launched from, so running Recall from a different project creates/deploys a different folder; because Pages deploys the whole publish directory, previously shared HTML files can be omitted from the deployment. Resolve/canonicalize the publish directory before saving it.
Useful? React with 👍 / 👎.
| let mut text = String::new(); | ||
| let mut rendered = false; | ||
| for line in message.content.lines() { | ||
| let sanitized = utils::sanitize_line(line); |
There was a problem hiding this comment.
Redact known local paths from shared messages
For sessions whose message text contains command output or prompts with paths such as the session cwd/source file path, the shared HTML still includes those paths because sanitize_line only strips control characters before the text is escaped and rendered. This misses the documented share-page privacy requirement to not show local filesystem paths; at least occurrences of known fields like session.directory and session.source_file_path should be replaced before publishing.
Useful? React with 👍 / 👎.
What's changed?
recall share initfor Cloudflare Pages configuration and Wrangler preflight.Why