HolyClaude icon indicating copy to clipboard operation
HolyClaude copied to clipboard

Shell tab always scrolls to top on periodic browser refresh

Open JaredT6694 opened this issue 7 months ago • 1 comments

Image Variant

Full (latest / dev)

Image Tag / Version

latest

Host OS

Linux

What happened?

When the HolyClaude browser UI performs its periodic automatic refresh, the Shell tab loses scroll position and jumps to the very top (beginning) of the conversation/output history. Unlike the Chat tab issue (where a workaround exists), there is no known workaround for the Shell tab — it will reset to the top on every refresh with no way to restore position short of manually scrolling back down.

Environment

  • Browser: [e.g. Firefox / Chromium]
  • OS: Linux
  • HolyClaude version/commit: [if known]

Additional context Related to a similar issue in the Chat tab, where periodic refresh also disrupts scroll position. The Chat tab has a partial workaround (toggling "Auto scroll to bottom" off and back on), but no equivalent exists for the Shell tab. The consistent, deterministic nature of the Shell tab reset (always top) vs. the Chat tab's non-deterministic behavior suggests these may have different root causes.

What did you expect?

Scroll position should be preserved across periodic refreshes so the user remains at their current location in the shell output.

Actual behavior Shell tab consistently scrolls to the very top (position 0) on every periodic refresh, regardless of where the user was. This is consistently reproducible and arguably more disruptive than the related Chat tab issue, as there is no workaround to restore position without manual scrolling.

Workaround None known. The user must manually scroll back to their position after every refresh cycle.

Steps to reproduce

  1. Open HolyClaude in the browser and navigate to the Shell tab
  2. Scroll down into an active or lengthy shell session
  3. Wait for the periodic automatic refresh to trigger
  4. Observe that the view resets to the top of the shell output

Docker Compose / Run command

# ==============================================================================
# HolyClaude — Full Configuration
# All options documented inline.
# Detailed docs: https://github.com/CoderLuii/HolyClaude/blob/main/docs/configuration.md
# ==============================================================================

services:
  holyclaude:
    image: coderluii/holyclaude:latest     # Full image (use :slim for smaller download)
    container_name: holyclaude
    hostname: holyclaude
    restart: unless-stopped
    shm_size: 2g                           # Chromium shared memory — increase to 4g for heavy browser use
    network_mode: bridge
    cap_add:
      - SYS_ADMIN                          # Required: Chromium sandboxing
      - SYS_PTRACE                         # Required: debugging tools (strace, lsof)
    security_opt:
      - seccomp=unconfined                 # Required: Chromium syscall requirements
    ports:
      #
      # CloudCLI web UI — this is the only port you need.
      # Override the host-side port from `.env` if 3001 is already in use.
      #
      - "${HOLYCLAUDE_HOST_PORT:-3001}:3001"
      #
      # Dev server ports — uncomment as needed.
      # These let you access dev servers running inside the container from your host browser.
      #
      # - "3000:3000"                      # Next.js / Express
      # - "4321:4321"                      # Astro
      # - "5173:5173"                      # Vite
      # - "8787:8787"                      # Wrangler (Cloudflare Workers)
      # - "9229:9229"                      # Node.js debugger
    volumes:
      #
      # PERSISTENT DATA
      #
      # ./data/claude — Settings, credentials, API keys, Claude's memory file.
      #                  Survives container rebuilds. NEVER delete this folder.
      #                  Override the host path from `.env` if you want it elsewhere.
      #
      - ${HOLYCLAUDE_HOST_CLAUDE_DIR:-./data/claude}:/home/claude/.claude
      #
      # ./workspace — Your code and projects. Everything you build goes here.
      #               Accessible from your host machine.
      #               Override the host path from `.env` if you want a different root.
      #
      - ${HOLYCLAUDE_HOST_WORKSPACE_DIR:-./workspace}:/workspace
      #
      # /media - this gives claude access to my media folder to search for duplicates and such
      #
      - ${HOLYCLAUDE_HOST_MEDIA_DIR}:/media:ro
    environment:
      #
      # TIMEZONE
      # Full list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      #
      #- TZ=UTC
      - TZ=${TZ}
      #
      # PERFORMANCE
      # Node.js heap memory limit in MB. Increase if you work on large monorepos
      # and hit out-of-memory errors. 4096 (4GB) is a solid default.
      #
      - NODE_OPTIONS=--max-old-space-size=4096
      #
      # USER MAPPING
      # Match these to your host user so files created inside the container
      # have the right ownership on your host. Run `id -u` and `id -g` on your host.
      #
      - PUID=${PUID}
      - PGID=${PGID}
      #
      # SMB/CIFS NETWORK MOUNTS
      # Only enable these if your volumes are on a NAS, Samba share, or CIFS mount.
      # They enable polling-based file watching since network mounts don't support inotify.
      # Leave commented out for local storage — polling uses more CPU.
      #
      # - CHOKIDAR_USEPOLLING=1
      # - WATCHFILES_FORCE_POLLING=true
      #
      # NOTIFICATIONS (optional)
      # Get notified when Claude finishes a task or hits an error.
      # Uses Apprise — supports 100+ services. Also requires creating a flag file
      # inside the container: touch ~/.claude/notify-on
      #
      # - NOTIFY_DISCORD=discord://webhook_id/webhook_token
      # - NOTIFY_TELEGRAM=tg://bot_token/chat_id
      # - NOTIFY_PUSHOVER=pover://user_key@app_token
      # - NOTIFY_SLACK=slack://token_a/token_b/token_c
      # - NOTIFY_EMAIL=mailto://user:[email protected][email protected]
      # - NOTIFY_GOTIFY=gotify://hostname/token
      # - NOTIFY_URLS=                                   # catch-all: comma-separated Apprise URLs
      #
      # AI PROVIDER KEYS (optional)
      # Claude Code can authenticate via web UI (OAuth) or ANTHROPIC_API_KEY.
      # Set these if you want to use additional AI CLIs or API-based auth.
      #
      # - GEMINI_API_KEY=your_key
      # - OPENAI_API_KEY=your_key
      # - CURSOR_API_KEY=your_key

Logs / Error output


JaredT6694 avatar Apr 07 '26 14:04 JaredT6694

fixed in v1.2.1 — the Shell tab's scroll position now persists across the periodic refresh cycle.

root cause was the 1-second settings poll triggering a React re-render that called xterm.js focus(), which reset the viewport. patched the vendored CloudCLI frontend to save and restore the scroll position around the focus() call.

update to v1.2.1 to get the fix.

CoderLuii avatar Apr 10 '26 07:04 CoderLuii