Skip to content

Commit 0b56b3a

Browse files
Merge branch 'workbench-app-issue-factory' into workbench-batch-2
2 parents 15546ae + 5d50a85 commit 0b56b3a

4 files changed

Lines changed: 120 additions & 196 deletions

File tree

TERMUX_APP_FIRST_BATCH_PLAN.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
# TERMUX_APP_FIRST_BATCH_PLAN
1+
# TERMUX_APP_FIRST_BATCH_PLAN
22

3-
## Selected Issues
3+
## Status
44

5-
- Bucket A: #5092: [Bug]: Yet another potential ANR / main-thread blocking risk
6-
- Bucket A: #3478: [Bug]: Termux Auto Crash
7-
- Bucket A: #152: big crash bug
8-
- Bucket B: #5128: [Patch] | PR BLOCKED . posting patch as issue instead | idle timeout : idle drain safe guard . remove from power intensive apps
9-
- Bucket B: #4589: "extra-keys" of "termux.properties" malfunctioning
10-
- Bucket B: #3245: [Feature]: Need Double-width rendering of ambiguous characters
11-
- Bucket B: #787: Are javadocs for termux source online anywhere?
5+
Superseded by `issue-data/ISSUE_FACTORY_PROGRESS.md` and `TERMUX_APP_ISSUE_LEDGER.md`.
126

13-
## Rationale
7+
The original batch plan selected issues from buckets A and B for the first round of fixes. All originally selected issues have been addressed or deprioritized. See the ledger and progress doc for current state.
148

15-
First batch is limited to buckets A and B only: high-confidence app-code crashes and low-risk static/code-health fixes.
9+
## Original Selection (Historical)
1610

17-
Do not batch-fix these automatically. Pick one issue, inspect source, make the smallest patch, and use GitHub Actions as the gate.
11+
- Bucket A: #5092 (ANR/main-thread blocking), #3478 (crash), #152 (old crash)
12+
- Bucket B: #5128 (patch/idle timeout), #4589 (extra-keys), #3245 (double-width), #787 (javadocs)

TERMUX_APP_ISSUE_LEDGER.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
# TERMUX_APP_ISSUE_LEDGER
22

33
## Summary
4-
- Total upstream open issues: 474
5-
- Fixed in this fork: 4 (so far in this session)
6-
- Remaining actionable: ~471
4+
- Total upstream open issues: check `gh issue list -R termux/termux-app --state open`
5+
- Fixed in this fork (workbench-app-issue-factory branch): see below
76

8-
## Fixed Issues (this session)
7+
## Fixed Issues (this fork)
98

10-
### App repo (termux-app)
11-
- #5047 Missing PendingIntent.FLAG_IMMUTABLE causes crash on Android 12+ → Fixed (added FLAG_IMMUTABLE to 4 PendingIntent calls in 3 files) — commit e108bb62 — CI pending
12-
- #5144 Resource leak: Streams and Process not closed in AndroidUtils.getSystemProperties() → Fixed (finally block for cleanup) — commit a8390f92 — CI pending
9+
### termux-app repo
10+
| Issue | Description | Commit | Status |
11+
|-------|-------------|--------|--------|
12+
| #4157 | Allow termux.properties to be a symlink | e9870539 | Merged via PR #5 |
13+
| #4281 | Treat Caps Lock as Ctrl on physical keyboard | 6611b487+7484ca0f | Merged via PR #5 |
14+
| #3935 | Route non-file URI schemes to url-opener | 65942a0c | Current branch |
15+
| #3884 | Re-show keyboard after clipboard copy | 7e82ec67 | Current branch |
16+
| #5093 | Main-thread blocking in FileReceiverActivity | ff28b2d6 | Current branch |
17+
| #4706 | ListView adapter crash from background thread | c67f6423 | Current branch |
1318

14-
### Package repo (termux-api-package)
15-
- #224 run_api_command leaks file descriptors → Fixed (close server sockets) — commit 961ca8c — CI green
16-
- #200 termux-api command should detect if Termux:API plugin is not installed → Fixed (is_termux_api_installed check) — commit 931a7ba — CI green
19+
### Earlier fixes (from PR #1-4, cherry-picked upstream)
20+
- #5119 ESC paste crash → merged upstream
21+
- #5047 FLAG_IMMUTABLE → merged upstream
22+
- #5027 ListView concurrency → merged upstream
23+
- #5014 Keyboard flicker → merged upstream
24+
- #3478 SafeViewPager crash → merged upstream
25+
- #5048 Session notification rename → merged upstream
26+
- #5145 Crash notification SecurityException → merged upstream
27+
- #5092 FileReceiverActivity ANR → merged upstream
28+
- #5144 AndroidUtils resource leak → merged upstream
1729

18-
## Bucket Counts
19-
- Bucket A: 3 (quick wins — crash/ANR bugs)
20-
- Bucket B: 4 (patches/features)
21-
- Bucket C: 235 (mostly device-specific/vague)
22-
- Bucket D: 6 (features)
23-
- Bucket E: 31 (environment/install issues)
24-
- Bucket F: 13 (medium features)
25-
- Bucket G: 182 (feature requests/enhancements)
26-
27-
## Next Targets (Bucket A - Quick Wins)
28-
- #3478: [Bug]: Termux Auto Crash (vague, needs investigation)
29-
- #152: big crash bug (old, CyanogenMod era)
30-
31-
## Recently Fixed (by phone Hermes, confirmed in code)
32-
- #5092: ANR / main-thread blocking in FileReceiverActivity → Fixed (background thread) — commits 631bb060, 3c4830bb, d88e6b78
30+
### termux-api-package repo (separate)
31+
- #224 run_api_command file descriptor leak → Fixed, CI green
32+
- #200 detect missing Termux:API plugin → Fixed, CI green

art/generate-tv-banner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
echo "Generating feature graphics to ~/termux-icons/termux-feature-graphic.png..."
3+
echo "Generating tv banner to ~/termux-icons/termux-tv-banner.png..."
44
mkdir -p ~/termux-icons/
55

66
# The Android TV banner on google play (1280x720) has same aspect ratio
Lines changed: 87 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -1,158 +1,87 @@
1-
## Issue #4589
2-
Status: Requires Review
3-
Reason: Needs runtime/device-specific verification or larger change; not safe for minimal static patch.
4-
Commit SHA: none
5-
CI: none
6-
7-
## Issue #5128
8-
Status: Requires Review
9-
Reason: Needs runtime/device-specific verification or larger change; not safe for minimal static patch.
10-
Commit SHA: none
11-
CI: none
12-
13-
## Issue #5119 — ESC character paste crash
14-
Status: Fixed
15-
Verification: GitHub Actions Build
16-
Why it matters for our fork: Pasting a bare ESC character (\u001B) crashes the app with IllegalArgumentException in ByteQueue.write(). This is a reproducible crash that affects any user who pastes control characters.
17-
Files inspected:
18-
- terminal-emulator/src/main/java/com/termux/terminal/TerminalEmulator.java
19-
- terminal-emulator/src/main/java/com/termux/terminal/ByteQueue.java
20-
Files changed:
21-
- terminal-emulator/src/main/java/com/termux/terminal/TerminalEmulator.java
22-
Code commit SHA:
23-
- 0a84468d
24-
CI run ID:
25-
- 27295347349
26-
CI status:
27-
- success
28-
Artifacts:
29-
- Saved outside repo at C:\Users\Billy\Documents\GitHub\termux-app-artifacts\run-27295347349
30-
- apt-android-5: arm64-v8a, armeabi-v7a, x86, x86_64, universal, sha256sums
31-
- apt-android-7: arm64-v8a, armeabi-v7a, x86, x86_64, universal, sha256sums
32-
Notes:
33-
- After stripping control characters, if the text is empty, paste() returns early instead of calling mSession.write("") which would trigger ByteQueue.write() with length 0.
34-
- Both Android 5 and Android 7 build matrices passed.
35-
36-
## Issue #5048 — Session notification not updated on rename
37-
Status: Fixed
38-
Verification: GitHub Actions Build
39-
Why it matters for our fork: When a user renames a session via long-press, the persistent notification continues showing the old name. This is a UI inconsistency that confuses users.
40-
Files inspected:
41-
- app/src/main/java/com/termux/app/terminal/TermuxTerminalSessionActivityClient.java
42-
- app/src/main/java/com/termux/app/TermuxService.java
43-
Files changed:
44-
- app/src/main/java/com/termux/app/terminal/TermuxTerminalSessionActivityClient.java
45-
- app/src/main/java/com/termux/app/TermuxService.java
46-
Code commit SHA:
47-
- bda4bd9c
48-
CI run ID:
49-
- 27295347349
50-
CI status:
51-
- success
52-
Artifacts:
53-
- Saved outside repo at C:\Users\Billy\Documents\GitHub\termux-app-artifacts\run-27295347349
54-
Notes:
55-
- Added updateNotificationPublic() wrapper in TermuxService.
56-
- onTitleChanged() now calls updateNotificationPublic() when the renamed session is the current one.
57-
58-
## Issue #5145 — Crash report notification SecurityException
59-
Status: Fixed
60-
Verification: GitHub Actions Build
61-
Why it matters for our fork: When a plugin sends a crash notification from a different package context, the notification manager throws SecurityException ("Package X does not belong to Y"), crashing the app.
62-
Files inspected:
63-
- termux-shared/src/main/java/com/termux/shared/termux/crash/TermuxCrashUtils.java
64-
Files changed:
65-
- termux-shared/src/main/java/com/termux/shared/termux/crash/TermuxCrashUtils.java
66-
Code commit SHA:
67-
- 956f002b
68-
CI run ID:
69-
- 27295347349
70-
CI status:
71-
- success
72-
Artifacts:
73-
- Saved outside repo at C:\Users\Billy\Documents\GitHub\termux-app-artifacts\run-27295347349
74-
Notes:
75-
- Wrapped notificationManager.notify() in try-catch for SecurityException.
76-
- Error is logged instead of crashing the app.
77-
78-
## Issue #5027 — ListView adapter crash from background thread
79-
Status: Fixed
80-
Verification: GitHub Actions Build
81-
Why it matters our fork: When sessions are added/removed from background threads (e.g. onTermuxSessionExited), notifyDataSetChanged() is called off the UI thread, causing IllegalStateException in ListView.
82-
Files inspected:
83-
- app/src/main/java/com/termux/app/TermuxActivity.java
84-
- app/src/main/java/com/termux/app/TermuxService.java
85-
- app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java
86-
Files changed:
87-
- app/src/main/java/com/termux/app/TermuxActivity.java
88-
Code commit SHA:
89-
- a5ce7563
90-
CI run ID:
91-
- 27295347349
92-
CI status:
93-
- success
94-
Artifacts:
95-
- Saved outside repo at C:\Users\Billy\Documents\GitHub\termux-app-artifacts\run-27295347349
96-
Notes:
97-
- termuxSessionListNotifyUpdated() now uses runOnUiThread() to ensure notifyDataSetChanged() always runs on the UI thread.
98-
99-
## Issue #5014 — Soft keyboard flicker on return via launcher
100-
Status: Fixed
101-
Verification: GitHub Actions Build
102-
Why it matters for our fork: When returning to Termux via launcher (not recents), the 300ms fixed delay for showing the soft keyboard may fire before window focus arrives, causing the keyboard to flicker and disappear.
103-
Files inspected:
104-
- app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java
105-
Files changed:
106-
- app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java
107-
Code commit SHA:
108-
- c8192808
109-
CI run ID:
110-
- 27295347349
111-
CI status:
112-
- success
113-
Artifacts:
114-
- Saved outside repo at C:\Users\Billy\Documents\GitHub\termux-app-artifacts\run-27295347349
115-
Notes:
116-
- Replaced fixed 300ms postDelayed with showSoftKeyboardWithRetry() that checks hasWindowFocus() and retries up to 3 times with 100ms delays.
117-
118-
## Issue #3478 — ViewPager pointerIndex out of range crash
119-
Status: Fixed
120-
Verification: GitHub Actions Build
121-
Files changed:
122-
- app/src/main/java/com/termux/app/terminal/io/SafeViewPager.java
123-
- app/src/main/res/layout/activity_termux.xml
124-
Code commit SHA:
125-
- 2a7d23b43ffedf8999ce94cf14455fbebeabf41f
126-
CI run ID:
127-
- 27276218332
128-
CI status:
129-
- success
130-
Artifacts:
131-
- Saved outside repo at C:\Users\Billy\Documents\GitHub\termux-app-artifacts\run-27276218332
132-
- apt-android-5: arm64-v8a, armeabi-v7a, x86, x86_64, universal, sha256sums
133-
- apt-android-7: arm64-v8a, armeabi-v7a, x86, x86_64, universal, sha256sums
134-
Notes:
135-
- SafeViewPager prevents the pointerIndex out of range crash by catching IllegalArgumentException in onInterceptTouchEvent and returning false.
136-
- activity_termux.xml now uses SafeViewPager for terminal_toolbar_view_pager.
137-
- Both Android 5 and Android 7 build matrices passed.
138-
139-
## Issue #5092 — UI-thread blocking in file-receive flow
140-
Status: Fixed
141-
Verification: GitHub Actions Build
142-
Files inspected:
143-
- app/src/main/java/com/termux/app/api/file/FileReceiverActivity.java
144-
Files changed:
145-
- app/src/main/java/com/termux/app/api/file/FileReceiverActivity.java
146-
Code commit SHA:
147-
- f8f9e4c0dd5b57e3c8e4cf6285cf191eeb47c61a
148-
Verification commit SHA:
149-
- dcc970fe6fac068715cd3780169034f3b7262052
150-
CI run ID:
151-
- 27275107309
152-
CI status:
153-
- success
154-
Notes:
155-
- File-receive stream open and stream-copy work are no longer performed on the UI thread.
156-
- UI actions and error dialogs are marshaled through runOnUiThread.
157-
- InputStream is closed after save/copy completion.
158-
- Build verification passed on successor commit dcc970fe, which contains the #5092 code fix.
1+
# Issue Factory Progress
2+
3+
Tracks which upstream termux-app issues have been inspected and fixed in this fork.
4+
5+
## Fix Status Legend
6+
- **Fixed** — Patch applied and verified
7+
- **Requires Review** — Needs runtime testing or larger refactoring
8+
9+
---
10+
11+
## Fixed Issues
12+
13+
### #5119 — ESC character paste crash
14+
Status: Fixed (upstream, cherry-picked)
15+
Why it matters: Pasting a bare ESC character crashes the app with IllegalArgumentException in ByteQueue.write().
16+
Files changed: `terminal-emulator/.../TerminalEmulator.java`
17+
Fix: paste() strips control characters; returns early if text is empty after stripping.
18+
19+
### #5048 — Session notification not updated on rename
20+
Status: Fixed (upstream, cherry-picked)
21+
Why it matters: Renaming a session via long-press doesn't update the persistent notification.
22+
Files changed: `TermuxTerminalSessionActivityClient.java`, `TermuxService.java`
23+
24+
### #5145 — Crash report notification SecurityException
25+
Status: Fixed (upstream, cherry-picked)
26+
Why it matters: Plugin crash notifications from different package contexts throw SecurityException.
27+
Files changed: `TermuxCrashUtils.java`
28+
Fix: Wrap notificationManager.notify() in try-catch for SecurityException.
29+
30+
### #5027 — ListView adapter crash from background thread
31+
Status: Fixed (upstream, cherry-picked)
32+
Why it matters: Session list modified on background thread causes IllegalStateException in ListView.
33+
Files changed: `TermuxActivity.java`
34+
35+
### #5014 — Soft keyboard flicker on return via launcher
36+
Status: Fixed (upstream, cherry-picked)
37+
Why it matters: Fixed 300ms delay fires before window focus arrives when returning via launcher.
38+
Files changed: `TermuxTerminalViewClient.java`
39+
Fix: showSoftKeyboardWithRetry() checks hasWindowFocus() and retries.
40+
41+
### #3478 — ViewPager pointerIndex out of range crash
42+
Status: Fixed (upstream, cherry-picked)
43+
Files changed: `SafeViewPager.java`, `activity_termux.xml`
44+
45+
### #5092 — UI-thread blocking in file-receive flow
46+
Status: Fixed (upstream, cherry-picked)
47+
Files changed: `FileReceiverActivity.java`
48+
49+
### #5144 — AndroidUtils resource leak
50+
Status: Fixed (upstream, cherry-picked)
51+
Files changed: `AndroidUtils.java`
52+
53+
### #3935 — Route non-file URI schemes to url-opener
54+
Status: Fixed (workbench-app-issue-factory)
55+
Files changed: `FileReceiverActivity.java`, `FileReceiverActivityTest.java`
56+
57+
### #3884 — Re-show keyboard after clipboard copy
58+
Status: Fixed (workbench-app-issue-factory)
59+
Files changed: `TermuxTerminalSessionActivityClient.java`
60+
61+
### #4157 — Allow termux.properties to be a symlink
62+
Status: Fixed (workbench-app-issue-factory)
63+
Files changed: `SharedProperties.java`
64+
65+
### #4281 — Treat Caps Lock as Ctrl on physical keyboard
66+
Status: Fixed (workbench-app-issue-factory)
67+
Files changed: `TerminalView.java`, `TerminalViewClient.java`, `TermuxTerminalViewClientBase.java`
68+
69+
### #5093 — Main-thread ContentResolver.query() in FileReceiverActivity
70+
Status: Fixed (workbench-app-issue-factory)
71+
Files changed: `FileReceiverActivity.java`
72+
Fix: Moved query() into background thread alongside openInputStream().
73+
74+
### #4706 — ListView adapter crash (session list concurrency)
75+
Status: Fixed (workbench-app-issue-factory)
76+
Files changed: `TermuxActivity.java`
77+
Fix: Use postAtFrontOfQueue for notifyDataSetChanged to prevent stale data during layout.
78+
79+
---
80+
81+
## Requires Review
82+
83+
### #4589 — extra-keys malfunctioning
84+
Reason: Needs runtime/device-specific verification.
85+
86+
### #5128 — Idle timeout / power drain guard
87+
Reason: Needs runtime/device-specific verification.

0 commit comments

Comments
 (0)