Skip to content

Draft: license openIME under GPL-3.0-only (owner decision) - #115

Closed
Slacker-LLC wants to merge 12 commits into
mainfrom
license/gpl-3.0-only
Closed

Slacker-LLC wants to merge 12 commits into
mainfrom
license/gpl-3.0-only

Conversation

@Slacker-LLC

Copy link
Copy Markdown
Owner

Draft: this is a decision for the project owner. Merge it to adopt GPL-3.0-only; close it to leave the repository unlicensed.

docs/LICENSING.md and THIRD_PARTY_NOTICES.md say the main license stays missing until the owner decides, so this PR does not merge itself into anything: it is stacked on the 1.0.0 release PR (#114) and is a draft.

Why GPL-3.0-only

  • The APK ships the Rime Ice dictionaries, which are GPL-3.0-only. Licensing the project the same way means distributing the APK has one clear license story and no argument about whether dictionary data and program are an aggregate or a combined work.
  • Every other bundled component is BSD-3-Clause (librime, Snappy), Apache-2.0 (OpenCC, sherpa-onnx, the Paraformer model) or MIT (Fluent Emoji), all compatible with GPL-3.0.
  • Without any license a public repository grants nobody the right to copy, modify or redistribute it, which is not what a public 1.0 release wants.

What changes

  • LICENSE: the official GPL-3.0 text.
  • README.md, docs/LICENSING.md, THIRD_PARTY_NOTICES.md, docs/RELEASE.md: say so, and note that changing the license later means first removing or replacing the Rime Ice dictionaries.

If a permissive license is preferred, the dictionaries have to go first; tell me and I will do that instead.

🤖 Generated with Claude Code

Slacker-LLC and others added 12 commits October 1, 2026 20:19
Local UI iteration on top of the v1 visual language: updated design tokens,
key/panel renderers, icon set (new delete/download/floating/pin/return/shield/
text-cursor/undo vectors), zh resources, reference emoji assets and the
reference capture/review scripts.

Known state: :app:testDebugUnitTest has 12 failing tests (IconLintTest,
KeyboardLayoutMetricsTest, NoDecorativeGlyphTest, NoRawColorTest,
NoRawTextSizeTest, ProductionKeyPolicyTest, TokenDriftTest) that guard the
design-token/metrics contracts; these need follow-up. output/ (screenshot
artifacts) is intentionally not committed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…swipe-clear

Nine-key left rail
- While composing, the rail lists the real syllables that can start the open
  digits (zhong/xiong/xin/yin), longest first, led by the previewed syllable.
  Tapping one fixes it and the rail moves on to the next position
  (rime-t9-shiyin / Trime style). Backspace unlocks the last fixed syllable
  and the segment key's boundary instead of deleting letters.
- Fixed syllables reach Rime as letters (luna_pinyin accepts letters and 2-9
  in one input) so zhong/xiong stay distinct and candidates match the choice.
- The pre-edit pinyin follows the word Rime ranks first
  (9694264244326 -> wo'xiang'chi'fan / 我想吃饭) instead of the local
  decoder's independent guess.
- The fixed prefix is the one the view recorded, not whatever follows a space:
  decoder-inserted spaces between guessed syllables were being treated as
  user-fixed boundaries. Edit/delete logic is now divider-aware.
- Side-rail symbols are centred by their ink bounds; full-width punctuation
  sat in the corner of its em box.

Enter / space
- Space commits the first candidate; Enter ("确定") commits the typed pinyin as
  text, matching Rime, fcitx and Gboard Pinyin. They were identical before.

Backspace swipe-up clear
- Arm distance lowered from 56dp to 32dp (CLEAR_ARM_DP); ordinary flicks fell
  through to a single delete. The debug clear-swipe hook moved only 48dp and
  never armed it; it now uses the shared constant.

Tests: core_regression.sh gains enter-keeps-pinyin cases (9/9 on emulator);
unit tests added for locked-code, syllable options and word readings. The 12
design-contract unit failures from the previous commit are unchanged.

Known open: choosing a partial candidate still drops the remaining input.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Choosing a word that spells only the start of the input (你 for 你好吗, in 26-
or 9-key) committed it and dropped the remaining input; the native
whole-composition commit also taught the user dictionary a phrase the user
never chose (probe: input 64426, pick 你, librime committed 你好).

- JNI: nativeCandidateEnds() returns each candidate's input extent
  (Candidate::end()). RimeCandidateEntry / NativeCandidateReference carry it
  as `consumed`.
- Service: a candidate with consumed < input length commits only its text and
  republishes the leftover (nine-key keeps any fixed syllables fixed). Space
  and tap share this path. No native learning for a partial pick.
- The commit and the new composing span run in one batch edit. Without it the
  editor reports a half-way selection state and onUpdateSelection discards
  the new composition as "user moved the cursor".

core_regression.sh: +033..036 (9-key/26-key partial pick, then space).
13/13 on emulator. Unit: the same 12 design-contract failures as before.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ation row

Swipe-up clear did nothing in editors that are not an EditText (Compose,
custom canvas, web: chat apps such as the user's own). clearAllText() only
accepted editors with a select-all action or a complete ExtractedText and
otherwise failed silently, while the gesture itself fired correctly (log:
clearArmed=true, finish commit=true). It now falls back to before/after-cursor
text: capture everything, delete until the editor reports empty (safe for
editors that cap their answers), keep an undo snapshot. An answer as long as
the request is treated as a possible window and is never deleted.
A new debug CustomEditorTestActivity reproduces such an editor; old build left
the text untouched, new build clears and restores it.

Gesture UI is one component now. Clear and restore were a red pill, a white
card and a tiny label inside the key; the pill was flush against the screen
edge. Now a single bubble (same size/position/animation) beside the key where
the thumb does not cover it: dark "上滑清空" -> red "松手清空" for clear,
dark "下滑撤回" -> accent "松手撤回" for restore. After a clear the toolbar
shows "已清空 [撤销]" for the five-second undo window. The restore hint is
driven by the gateway's real undo snapshot instead of a flag that never
expired. The release coordinates count as a last move (quick flicks cross
the threshold on the UP itself). The arm distance is 32dp (was 56dp).

Association row (after committing a word) matches the design: "‹ words ∨".
The hide chevron kept layout weight 1 and shared the row with the words, so
the chevron floated mid-row and the words were pushed right.

Accent: pre-edit text, tool icons and setup accents used a hard-coded #006AB1
in light themes and ignored the chosen accent, so a custom accent put two
unrelated blues side by side. selectedText() now derives a readable shade
from the active accent.

Known: 12 design-contract unit tests still fail (unchanged).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…xed syllables stay fixed

Left rail (composing): a list of readings, one continuous panel with flat
items and an accent pill on the selected one, as in the design draft.
Short input lists whole readings (ni'hao, mi'gan, ni'gao ...); once a whole
reading no longer fits the rail it lists first syllables (zhong, xiong) and
fixing one moves the list to the next position (Baidu / rime-t9-shiyin). A tap
fixes exactly what the item shows. Readings come from a beam search over real
syllables that rewards word-forming paths and drops digit-grid artefacts
(lone a/o/e, vowel-less ng/m); choices that leave unreadable digits are never
offered.

A syllable the user fixed stays fixed when more digits follow (it is sealed
with a boundary instead of being re-decoded), and backspace unlocks the last
fixed syllable or the boundary the segment key made.

Pre-edit boundaries are apostrophes everywhere (ni'hao), not spaces.

Ranking: words the typed digits spell exactly now come before longer words
that merely start with them. Typing xian (9426) led with 自从 (zi'cong, a
prediction) while the pre-edit said xian. Rime's order is kept inside each
group and nothing is dropped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cisions); changelog

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…p a11y and clipboard targets

Visual refresh (design tokens, vector marks, typography roles, setup page)
and the fixes it needed to land green:

- layout: widen the reference-scale change epsilon (0.001 -> 0.01) and post
  a relayout after a rebuild in onSizeChanged. Configuration.screenWidthDp
  is a whole number while the measured width is not, so the same window
  looked like a new geometry, every key row was rebuilt mid-layout and the
  keyboard stayed blank on first show.
- setup: hide each card's decoration from accessibility in code. The layout
  refresh dropped the importantForAccessibility attributes and the runtime
  status pill never had them, so a screen reader landed on every child.
- clipboard: retention / confirm actions keep a 48dp touch target and are
  painted 36dp inside it (as the settings segmented controls, 34dp in 48dp).
- tests: IconLint, TokenDrift, KeyboardLayoutMetrics and ProductionKeyPolicy
  follow the redesigned contracts; instrumented tests follow the current UI
  (skin sub-page, appearance picker, voice language segments, preview popup,
  scaled cursor-drag distances, arrow glyph cursor keys, setup cards, nine-key
  reading list, expanded candidate overlay). isKeyPopupShown() and scaledPx()
  are the new test hooks: the key preview is a permanent child that only
  toggles visibility, and gesture thresholds scale with the reference size.
- docs: changelog, SOP swipe-clear criteria; ignore generated output/.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- VERSION (MAJOR.MINOR.PATCH) is read by app/build.gradle.kts; versionCode is
  derived as major*10000 + minor*100 + patch, so it cannot drift and every
  release is strictly greater than the one before (1.0.0 -> 10000; development
  builds were at 4, so in-place upgrades keep working).
- scripts/release_check.py applies the same rules to the repository (VERSION is
  plain semver, CHANGELOG.md has the dated section for it right below
  [Unreleased], tag == v<VERSION>) and to a built APK (package, versionName,
  versionCode via aapt2), with unit tests.
- CHANGELOG.md is reorganised into Keep a Changelog form with a user-facing
  1.0.0 section (it doubles as the GitHub Release notes). The old
  development-period entries are kept verbatim in docs/CHANGELOG_PRE_1.0.md.
- .gitignore: Python caches and signing material (*.jks, *.keystore, *.p12).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…l CI

Release workflow (scripts/release_build.sh does the work, so it can also be run
locally):
- tags must be vX.Y.Z, equal VERSION, sit on main and have passed Build and
  verify plus both compatibility jobs; the changelog section becomes the
  release notes.
- verifies the APK: signed by a non-debug key, only arm64-v8a, package and
  version match VERSION, certificate matches docs/release-cert.sha256 once it is
  recorded.
- the job that holds the signing key cannot write to the repository; a second
  job (contents: write, no key) creates a draft release, checks all three
  assets are attached, then publishes.
- the same pipeline runs with a throwaway key on manual runs and on pull
  requests that touch the pipeline (nothing is published), so the first real
  release is not the first run. lintRelease, which PR CI never ran, is part of it.
- scripts/setup_release_signing.sh creates the key and the four Actions secrets
  without printing the passwords, and refuses to overwrite an existing key.

Android CI: version/changelog checks run before the toolchain is installed, the
built APK's identity is verified, and the API 29/31 jobs now fail when the
instrumentation report does not end in "OK (N tests)" (am instrument exits 0 on
failures).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- docs/RELEASE.md: versioning rules, changelog rules, signing key custody,
  release steps, rehearsal, rollback.
- docs/REPOSITORY.md and scripts/apply_repo_settings.sh: squash-only merges with
  the PR title/body as the commit message, protected main (PR + Build and verify,
  linear history, no force push), immutable v* tags, security features, so the
  settings are reviewable and reproducible.
- Dependabot (Actions and Gradle, weekly, grouped), CODEOWNERS, PR template
  changelog/version checklist, SECURITY.md supported versions and private
  reporting, CONTRIBUTING branch/merge/version rules, README download and
  verification instructions, CI gate documentation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The release workflow writes three secrets into GITHUB_ENV as NAME=value lines,
so a value containing a newline could inject further variables; refuse it.
release_build.sh needs mapfile and empty-array expansion under set -u (bash
4.4+); fail with a clear message instead of an obscure error on macOS bash 3.2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The APK ships Rime Ice dictionaries that are GPL-3.0-only. Licensing the project
the same way leaves no question about how the dictionary data and the program
relate when the APK is distributed, and every other bundled component (BSD,
Apache-2.0, MIT) is compatible. LICENSE is the official GPL-3.0 text.

The repository said the main license stays missing until the owner decides, so
this is proposed as a draft: merge it to adopt GPL-3.0-only, close it to keep the
repository unlicensed (not recommended for a public 1.0).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Base automatically changed from feat/nine-key-reading-rail to main October 2, 2026 05:49
@Slacker-LLC

Copy link
Copy Markdown
Owner Author

Closed as part of the repository cleanup (only main is kept). The proposal stays in this PR's history; to adopt GPL-3.0-only later, reopen it or ask for it to be redone against main.

@Slacker-LLC Slacker-LLC closed this Oct 2, 2026
@Slacker-LLC
Slacker-LLC deleted the license/gpl-3.0-only branch October 2, 2026 05:52
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.

1 participant