> ## Documentation Index
> Fetch the complete documentation index at: https://ophel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reading history, scroll lock, and position restore

> Automatically save and restore your reading position per conversation, lock the page during AI generation, and jump around long threads with one-click anchors.

export const ShortcutLegend = ({lang = "en"}) => {
  const isZh = lang === "zh";
  return <div className="ophel-shortcut-legend" role="note">
      <div className="ophel-shortcut-legend-title">
        {isZh ? "跨平台按键说明" : "Cross-platform key mapping"}
      </div>
      <div className="ophel-shortcut-legend-body">
        {isZh ? <>
            文档中的快捷键会同时显示 Windows/Linux 与 Mac 写法：
            <code>Ctrl</code> 对应 <code>Command</code>，
            <code>Alt</code> 对应 <code>Option</code>。唯一例外是提示词发送，
            <code>Ctrl+Enter</code> 在 Mac 上也使用 <code>Ctrl+Enter</code>。
          </> : <>
            Shortcuts show both Windows/Linux and Mac keys: <code>Ctrl</code> maps
            to <code>Command</code>, and <code>Alt</code> maps to
            <code>Option</code>. Prompt submit is the only exception:
            <code>Ctrl+Enter</code> remains <code>Ctrl+Enter</code> on Mac.
          </>}
      </div>
    </div>;
};

export const Shortcut = ({combo, mac, sameOnMac = false}) => {
  const keyLabels = {
    arrowup: {
      win: "Up",
      mac: "↑"
    },
    arrowdown: {
      win: "Down",
      mac: "↓"
    },
    arrowleft: {
      win: "Left",
      mac: "←"
    },
    arrowright: {
      win: "Right",
      mac: "→"
    },
    up: {
      win: "Up",
      mac: "↑"
    },
    down: {
      win: "Down",
      mac: "↓"
    },
    left: {
      win: "Left",
      mac: "←"
    },
    right: {
      win: "Right",
      mac: "→"
    },
    esc: {
      win: "Esc",
      mac: "Esc"
    },
    escape: {
      win: "Esc",
      mac: "Esc"
    },
    enter: {
      win: "Enter",
      mac: "Enter"
    },
    shift: {
      win: "Shift",
      mac: "⇧"
    },
    backslash: {
      win: "\\",
      mac: "\\"
    }
  };
  const modifierLabels = {
    ctrl: {
      win: "Ctrl",
      mac: "⌘"
    },
    control: {
      win: "Ctrl",
      mac: "⌘"
    },
    cmd: {
      win: "Ctrl",
      mac: "⌘"
    },
    command: {
      win: "Ctrl",
      mac: "⌘"
    },
    alt: {
      win: "Alt",
      mac: "⌥"
    },
    option: {
      win: "Alt",
      mac: "⌥"
    },
    shift: {
      win: "Shift",
      mac: "⇧"
    }
  };
  const normalizeToken = token => String(token || "").trim();
  const formatKey = (token, platform) => {
    const normalized = normalizeToken(token);
    const key = normalized.toLowerCase();
    const mapped = keyLabels[key];
    if (mapped) return mapped[platform];
    if (normalized.length === 1) return normalized.toUpperCase();
    return normalized;
  };
  const formatCombo = (value, platform) => String(value || "").split("+").map(normalizeToken).filter(Boolean).map(token => {
    const mapped = modifierLabels[token.toLowerCase()];
    return mapped ? mapped[platform] : formatKey(token, platform);
  }).join(platform === "mac" ? "" : "+");
  const windowsLabel = formatCombo(combo, "win");
  const macLabel = sameOnMac ? windowsLabel : mac || formatCombo(combo, "mac");
  const title = windowsLabel === macLabel ? windowsLabel : `Windows/Linux: ${windowsLabel}; Mac: ${macLabel}`;
  return <span className="ophel-shortcut" title={title}>
      <code>{windowsLabel}</code>
      {windowsLabel !== macLabel && <>
          <span className="ophel-shortcut-separator"> / </span>
          <code>{macLabel}</code>
        </>}
    </span>;
};

export const Icon = ({src, alt}) => <img src={typeof window !== "undefined" && typeof src === "string" && src.startsWith("/images/icons/") && (window.location.pathname === "/docs" || window.location.pathname.startsWith("/docs/")) ? `/docs${src}` : src} alt={alt} width="18" height="18" style={{
  display: "inline-block",
  verticalAlign: "-0.2em",
  margin: "0 0.15em"
}} />;

Ophel tracks where you are in each conversation so you never have to scroll back to find your place. Pair that with scroll lock to stay on the part you're reading while the AI is still generating, and a set of quick navigation anchors to jump around long threads instantly.

## Reading history

When you leave a conversation, Ophel quietly records your scroll position. The next time you return, it scrolls you back to exactly where you left off.

**Settings → Features → Reading History**:

| Setting                 | Description                                           | Default |
| ----------------------- | ----------------------------------------------------- | ------- |
| Record reading position | Track scroll position per conversation                | On      |
| Auto-restore            | Scroll to last position when reopening a conversation | On      |
| Retention period        | How long records are kept before automatic cleanup    | 30 days |

Available retention periods: 1 day / 3 days / 7 days / 30 days / 90 days / Forever.

<Tip>
  To re-read a conversation from the top on a single visit without disabling auto-restore, append `?ophel_skip_restore=1` to the URL when opening it. Ophel skips the restore for that visit only.
</Tip>

## Scroll lock

While the AI is generating, the page automatically scrolls down to follow new output. If you're reading something earlier in the thread, this is disruptive. Scroll lock freezes the page's scroll position for the duration of generation; once the AI finishes, normal scrolling resumes.

**How to toggle:**

<Tabs>
  <Tab title="Keyboard shortcut">
    Press <Shortcut combo="alt+s" /> to toggle scroll lock on or off.
  </Tab>

  <Tab title="Toolbox menu">
    Click the <Icon src="/docs/images/icons/tools.svg" alt="Toolbox icon" /> toolbox icon in the floating button group, then select <Icon src="/docs/images/icons/scroll-lock.svg" alt="Scroll lock icon" /> **Scroll Lock**.
  </Tab>
</Tabs>

<Note>
  Scroll lock is a temporary per-session state and does not persist across page refreshes. If you need it active on every visit to a particular site, toggle it manually after each page load.
</Note>

## Navigation anchors

The floating button group provides three scroll shortcuts that also work as a navigation system:

| Button                                                                                      | Keyboard shortcut          | What it does                            |
| ------------------------------------------------------------------------------------------- | -------------------------- | --------------------------------------- |
| <Icon src="/docs/images/icons/scroll-top.svg" alt="Scroll to top icon" /> Scroll to top          | <Shortcut combo="alt+t" /> | Loads full history and jumps to the top |
| <Icon src="/docs/images/icons/scroll-bottom.svg" alt="Scroll to bottom icon" /> Scroll to bottom | <Shortcut combo="alt+b" /> | Jumps to the latest message             |
| <Icon src="/docs/images/icons/anchor.svg" alt="Return to anchor icon" /> Return to anchor        | <Shortcut combo="alt+z" /> | Returns to the last saved position      |

Every time you use **Scroll to top** or **Scroll to bottom**, Ophel saves your current position as an anchor first. Click **Return to anchor** to jump back. Click it again to toggle between the anchor and wherever you are now — useful for cross-referencing two parts of a long conversation.

<Tip>
  If you want to save your current position as an anchor without scrolling anywhere, enable the <Icon src="/docs/images/icons/manual-anchor.svg" alt="Manual anchor icon" /> **Manual Anchor** button in **Settings → General → Quick Buttons** (hidden by default).
</Tip>

## Bookmarks

Ophel lets you bookmark specific messages in a conversation for quick access later. Bookmarked items appear in the outline panel so you can jump to them from the sidebar.

To remove bookmarks that point to content that no longer exists, open the <Icon src="/docs/images/icons/tools.svg" alt="Toolbox icon" /> **Toolbox** and select <Icon src="/docs/images/icons/cleanup.svg" alt="Clear invalid bookmarks icon" /> **Clear Invalid Bookmarks**.
