Skip to content

Add static "My Spy Code" site, update 客戶.html and README, and add GitHub Pages workflow - #1

Open
lan2015se-collab wants to merge 1 commit into
mainfrom
codex/add-my-spy-code-encryption-feature
Open

Add static "My Spy Code" site, update 客戶.html and README, and add GitHub Pages workflow#1
lan2015se-collab wants to merge 1 commit into
mainfrom
codex/add-my-spy-code-encryption-feature

Conversation

@lan2015se-collab

Copy link
Copy Markdown
Owner

Motivation

  • Provide a small static web app called "My Spy Code" for encoding/decoding text into a custom Morse-like scheme and publish it via GitHub Pages.
  • Enable automatic deployment on pushes to main/master using GitHub Actions.

Description

  • Add a GitHub Actions workflow /.github/workflows/pages.yml that configures and deploys the repository to GitHub Pages using actions/configure-pages, actions/upload-pages-artifact, and actions/deploy-pages on pushes to main/master and on manual dispatch.
  • Add a new index.html containing the full static UI and client-side JavaScript implementing the custom encoding/decoding logic, emoji preprocessing, a codebook, share/copy buttons, and UI/UX styles.
  • Replace/upgrade 客戶.html to embed the same static "My Spy Code" app (the previous review form and its scripts/styles were removed and replaced by the new app content).
  • Update README.md with instructions (in Chinese) for enabling GitHub Pages and the expected URL format, and mention that index.html is synchronized from 客戶.html.

Testing

  • No automated tests were run as part of this change; the CI workflow added is for Pages deployment and has not been executed in this PR.

Codex Task

@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: fd34383509

ℹ️ 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 thread index.html
}

let decoded = chars.join('');
decoded = decoded.replace(/:([a-z0-9\- ]+):/gi, '[$1]');

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 Stop rewriting literal :name: text during decode

The decoder currently applies decoded.replace(/:([a-z0-9\- ]+):/gi, '[$1]') to every message, so normal plaintext like :abc: is not round-tripped and comes back as [abc] after encode/decode. This silently corrupts user content that uses colon-delimited tokens (emoji shortcodes, labels, or markdown-like text), even when no emoji preprocessing was intended.

Useful? React with 👍 / 👎.

Comment thread index.html
Comment on lines +189 to +190
const graphemes = [...text];
return graphemes.map(ch => isLikelyEmoji(ch) ? `:${emojiToName(ch)}:` : ch).join('');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Segment emoji as graphemes before name preprocessing

preprocessEmojiToEnglishName uses [...text], which iterates Unicode code points rather than full grapheme clusters, so multi-codepoint emoji (for example ❤️) are split and no longer match EMOJI_NAME_MAP. This produces inconsistent placeholders and leaves artifacts (e.g., a trailing variation selector) in decrypted output, breaking the advertised emoji handling for common emoji sequences.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant