Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete renders in the wrong place #2058

Open
3 tasks done
admapop opened this issue Nov 16, 2022 · 44 comments
Open
3 tasks done

Autocomplete renders in the wrong place #2058

admapop opened this issue Nov 16, 2022 · 44 comments
Labels
terminal:Jetbrains Issues related to Jetbrains type:bug Something isn't working
Milestone

Comments

@admapop
Copy link

admapop commented Nov 16, 2022

Checks

  • I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
  • I have run fig doctor in the affected terminal session
  • I have run fig restart and replicated the issue again

Operating system

macOS 12.3.1 (21E258)

Expected behaviour

When the autocomplete window appears it should be next to what I am typing

Actual behaviour

When the autocomplete window appears it is in a completely different place. Could be on the same screen but far away from where I'm typing, same screen but completely random or even on a completely different screen.

Where I'm typing
image

Where it's showing, completely random on a different screen.
image

Steps to reproduce

Start up IntelliJ IDEA, open a terminal and start typing.

Environment

fig-details:
  - 2.7.9
hardware-info:
  - model: 
  - model-id: 
  - chip-id: Apple M1 Pro
  - cores: 10
  - mem: 16.00 GB
os-info:
  - macOS 12.3.1 (21E258)
environment:
  - shell: /bin/zsh
  - terminal: intellij
  - cwd: 
  - exe-path: /Users/admapop/.fig/bin/fig
  - install-method: unknown
  - env-vars:
    - FIGTERM_SESSION_ID: b85e4d02-3d2f-4475-862b-979d20b13b79
    - FIG_HOSTNAME: Adrians-MacBook-Pro.local
    - FIG_TERM: 2.7.9
    - PATH: 
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - FIG_PID: 99906
    - FIG_PARENT: b85e4d02-3d2f-4475-862b-979d20b13b79
    - FIG_SET_PARENT: b85e4d02-3d2f-4475-862b-979d20b13b79
@admapop admapop added NEED_TO_LABEL type:bug Something isn't working labels Nov 16, 2022
@mschrage mschrage added terminal:Jetbrains Issues related to Jetbrains and removed NEED_TO_LABEL labels Nov 16, 2022
@mschrage
Copy link
Member

Hey @admapop, how did you install the JetBrains IDE you are using? This could be related to #2018.

@admapop
Copy link
Author

admapop commented Nov 17, 2022

Hey @mschrage I installed it via its own .dmg file, didn't use any Toolbox or installer.

One thing I can add is that it happens more often if I switch between fullscreen mode and windowed mode.
Wildshot but I'm using magnet for window management.

@richardcase
Copy link

I am encountering this when using Kitty.

@JasonTheAdams
Copy link

JasonTheAdams commented Nov 21, 2022

I've also started having this issue on MacOS since the latest update. I have PhpStorm running on one monitor, and when I type in the terminal on that screen the Fig pop sometimes displays in the exact bottom-left corner of my main monitor.

@JasonTheAdams
Copy link

To be clear, for me this is an intermittent issue. I just opened PhpStorm back up and the popup is in the correct place. I didn't update anything. I just opened it back up for work today; it wasn't working yesterday, it is today. Gotta love these kinds of bugs. 😅

@onkr0d
Copy link

onkr0d commented Dec 7, 2022

Having the same issue with fig 2.9.0, macOS 13.0.1 (22A400). Started happening after I installed Rectangle, which is similar to @admapop's Magnet.

Specifically, it happens only on my secondary monitor, not the main (laptop) one. Intellij installed from Toolbox, but that hasn't been an issue for me previously.

@tomhendra
Copy link

👋 Another Kitty user here experiencing the same issue.

@squili squili removed their assignment Dec 13, 2022
@squili
Copy link

squili commented Dec 13, 2022

I'm no longer working at Fig, maybe @grant0417 can take a look

@grant0417
Copy link
Member

This should be resolved now in Fig 2.10, let me know if you continue to have any issues!

@onkr0d
Copy link

onkr0d commented Dec 15, 2022

Nope, the issue still persists. It is probably related to #2109.

@grant0417
Copy link
Member

Can you make sure to restart both Fig and intellij

@tomhendra
Copy link

tomhendra commented Dec 15, 2022

The issue persists with Fig v2.10.1 when using Kitty, after restarting both.

Screen.Recording.2022-12-15.at.10.01.41.mov

@richardcase
Copy link

richardcase commented Dec 15, 2022

This should be resolved now in Fig 2.10, let me know if you continue to have any issues!

I'm still getting this issue in kitty with 2.10.1

@grant0417
Copy link
Member

grant0417 commented Dec 15, 2022

Did not realize this was an issue on Kitty, thought it was only Jetbrains.

If you are having this issue with Kitty can you share the output of the following:

  • kitty --version
  • echo $__CFBundleIdentifier
  • fig debug input-method

@tomhendra
Copy link

~ 
❯ kitty --version           
kitty 0.26.5 created by Kovid Goyal
~echo $__CFBundleIdentifier
net.kovidgoyal.kitty
~ 
❯ fig debug input-method
Installed? true
TISInputSource {
    bundle_id: Some(
        "io.fig.cursor",
    ),
    input_source_id: Some(
        "io.fig.cursor",
    ),
    input_source_category: Some(
        "TISCategoryPaletteInputSource",
    ),
    input_source_is_enabled: Some(
        true,
    ),
    input_source_is_selected: Some(
        true,
    ),
    localized_name: Some(
        "FigInputMethod",
    ),
    input_mode_id: None,
    category_keyboard: None,
}
~ 

@grant0417
Copy link
Member

Hey @tomhendra can you also run fig doctor --verbose

@tomhendra
Copy link

tomhendra commented Dec 19, 2022

Sure can, @grant0417. Here you go.

Let's check if you're logged in...
✔ Logged into Fig

Let's check your dotfiles...
✔ ~/.bashrc contains valid fig hooks
✔ ~/.profile contains valid fig hooks
✔ ~/.zshrc contains valid fig hooks
✔ ~/.zprofile contains valid fig hooks

Let's make sure Fig is setup correctly...
✔ Fig bin exists
✔ PATH contains ~/.local/bin
✔ PATH contains ~/.fig/bin
✔ Settings Corruption
✔ State Corruption
✔ Fig Integration
✔ SSH integration

Let's make sure Fig is running...
✔ Fig is running
✔ Fig socket exists
✔ Daemon
✘ Daemon diagnostics: Daemon websocket error
Fig error:

<title>Error</title>
Cannot GET /authenticate/ticket
(status: 404 Not Found)

Let's see if Fig is in a working state...
✔ Figterm
✔ Insertion lock does not exist
✔ Autocomplete dev mode
✔ Plugin dev mode
✔ Dashboard is loading from the correct URL
✔ Autocomplete is loading from the correct URL

Let's check if your system is compatible...
✔ OS is supported
✔ Fish is up to date
✔ Jetbrains Toolbox Check

Let's check fig diagnostic...
✔ Compatible shell
✔ Fig app installed in the right place
✔ Autocomplete is enabled
✔ Fig CLI path
✔ Accessibility enabled

Let's check your terminal integrations...
✔ Terminal support
✔ Input Method

@mschrage
Copy link
Member

@tomhendra can you share a screen recording of the behavior? To confirm, the autocomplete window appears with the correct suggestions but it is simply located in the wrong place on the screen?

Does Fig autocomplete work as expected in other terminals, like iTerm or the native terminal app?

@tomhendra
Copy link

@mschrage the autocomplete window appears on my MBP screen, while the Kitty window I am using is on an external display. I have supplied two separate screen recordings as I can't seem to find a way to record both screens at the same time.

screen-rec-fig-1.mp4

It seems that the native terminal and iTerm2 work as expected.

screen-rec-fig-0.mp4

Hope this helps.

@grant0417
Copy link
Member

That does help, seems that kitty might be reporting the coordinates relative to the local screen, could you try alacritty to see if it works in a similar manor?

@mschrage is this an error with our IME logic or kitty?

@tomhendra
Copy link

@grant0417 I can confirm the issue is present with alacritty.

@github-actions
Copy link

This issue has been automatically closed because there has been no activity for 14 days.

@tomhendra
Copy link

Did you good folks manage to get any further with the Kitty issue? —Sorry to be a pest!

@grant0417 grant0417 reopened this Dec 30, 2022
@grant0417
Copy link
Member

Do you use an external monitor/secondary @tomhendra? That might have been an issue with kitty.

@tomhendra
Copy link

tomhendra commented Dec 30, 2022

Thanks for reopening this @grant0417. Yes that is exactly the problem I have—with the secondary monitor.

@github-actions
Copy link

This issue has been automatically closed because there has been no activity for 14 days.

@grant0417
Copy link
Member

@tomhendra that should be resolved in 2.11 which will be release in a week or two.

@grant0417 grant0417 added this to the 2.11.0 milestone Dec 30, 2022
@grant0417
Copy link
Member

2.11 is live, please let me know if this version resolves your issues

@richardcase
Copy link

Hi @grant0417 - i have upgraded to 2.11 and i'm still encountering the issue with kitty.

@tomhendra
Copy link

tomhendra commented Jan 10, 2023

Hello @grant0417, it works on my machine... Thank you!

If I can be of any more use with diagnostics or whatever to get things working for Richard, I'd be happy to help.

@richardcase
Copy link

ScreenFlow

I ran fig doctor --verbose:

➜ fig doctor --verbose
Let's check if you're logged in...
✔ Logged into Fig

Let's check your dotfiles...
✔ bash ~/.bashrc integration check
✔ bash ~/.profile integration check
✔ bash ~/.bash_profile integration check
✔ zsh ~/.zshrc integration check
✔ zsh ~/.zprofile integration check

Let's make sure Fig is setup correctly...
✔ Fig bin exists
✔ PATH contains ~/.local/bin
✔ PATH contains ~/.fig/bin
✔ Settings Corruption
✔ State Corruption
✔ Fig Integration
✔ SSH integration

Let's make sure Fig is running...
✔ Fig is running
✔ Fig socket exists
✔ Daemon
✔ Daemon diagnostics

Let's see if Fig is in a working state...
✔ Figterm
✔ Insertion lock does not exist
✔ Autocomplete dev mode
✔ Plugin dev mode
✔ Dashboard is loading from the correct URL
✔ Autocomplete is loading from the correct URL

Let's check if your system is compatible...
✔ OS is supported
✔ Fish is up to date
✔ Jetbrains Toolbox Check

Let's check fig diagnostic...
✔ Compatible shell
✔ Fig app installed in the right place
✔ Autocomplete is enabled
✔ Fig CLI path
✔ Accessibility enabled

Let's check your terminal integrations...
✔ Terminal support
✔ Input Method

@mschrage
Copy link
Member

@richardcase can you run echo $__CFBundleIdentifier inside of Kitty and share the output?

Also can you run fig debug logs in a separate terminal session and record both terminal windows as you type into kitty?

@richardcase
Copy link

Thanks @mschrage.

Here you go:

net.kovidgoyal.kitty

And the 2 terminals recording (kitty and the standard mac terminal):

2terminals

I saved the fig debug log to this gist: https://gist.github.com/richardcase/4c1a59a4b789ed9beeda93666060ead4

Let me know if there is anything i can do to help (i love ❤️ fig by the way)

@mschrage
Copy link
Member

Hey @richardcase! Glad to hear you're liking Fig :)

Strange request: can you try quitting Microsoft Teams and seeing if this helps?

@richardcase
Copy link

@mschrage - i quit teams and it still does it.

I will run some tests to confirm, but I think I get the error when I do this:

  • Power on my MacBook - which is plugged into an external monitor
  • Open the lid to use the keyboard to do the initial login
  • Then when fully booted close the lid

And i think it works if i do this:

  • Power on my MacBook - which is plugged into an external monitor
  • Open the lid to use the keyboard to do the initial login
  • immediately shut the lid whilst its still booting (post login)

I will run some tests to see if ^^^^^ is true and confirm back.

@admapop
Copy link
Author

admapop commented Jan 11, 2023

I'm still encountering this issue with IntelliJ on the latest version.

EDIT:
Actually a new day, and the issue seems to have disappeared with IntelliJ at least!

@gcstr
Copy link

gcstr commented Jan 16, 2023

Fig v2.12.0 and kitty 0.26.5 and the issue is present

@freddygv
Copy link

Also running into issues with Fig 2.14.2, kitty 0.27.1, and MacOS 12.6.3

If I use the built-in terminal the autocomplete shows up in the correct location, but with kitty it always shows up in the bottom left corner of my external monitor. Even if Kitty is in my laptop's screen.

~ 
❯ kitty --version
kitty 0.27.1 created by Kovid Goyal

~ 
❯ echo $__CFBundleIdentifier
net.kovidgoyal.kitty

~ 
❯ fig debug input-method
Installed? true
TISInputSource {
    bundle_id: Some(
        "io.fig.cursor",
    ),
    input_source_id: Some(
        "io.fig.cursor",
    ),
    input_source_category: Some(
        "TISCategoryPaletteInputSource",
    ),
    input_source_is_enabled: Some(
        true,
    ),
    input_source_is_selected: Some(
        true,
    ),
    localized_name: Some(
        "FigInputMethod",
    ),
    input_mode_id: None,
    category_keyboard: None,
}

~ 
❯ fig doctor --verbose
Let's check if you're logged in...
✔ Logged into Fig

Let's check your dotfiles...
✔ bash ~/.bashrc integration check
✔ bash ~/.profile integration check
✔ zsh ~/.zshrc integration check
✔ zsh ~/.zprofile integration check

Let's make sure Fig is setup correctly...
✔ Fig bin exists
✔ PATH contains ~/.local/bin
✔ PATH contains ~/.fig/bin
✔ Settings Corruption
✔ State Corruption
✔ Fig Integration
✔ SSH integration

Let's make sure Fig is running...
✔ Fig is running
✔ Fig socket exists
✔ Daemon
✔ Daemon diagnostics

Let's see if Fig is in a working state...
✔ Figterm
✔ Insertion lock does not exist
✔ Autocomplete dev mode
✔ Plugin dev mode
✔ Dashboard is loading from the correct URL
✔ Autocomplete is loading from the correct URL

Let's check if your system is compatible...
✔ OS is supported
✔ Fish is up to date
✔ Jetbrains Toolbox Check

Let's check fig diagnostic...
✔ Compatible shell
✔ Fig app installed in the right place
✔ Autocomplete is enabled
✔ Fig CLI path
✔ Accessibility enabled

Let's check your terminal integrations...
✔ Terminal support
✔ Input Method

@nanonandi
Copy link

Same as @freddygv for me, always in the bottom left corner
Fig 2.14.2
Kitty 0.27.1

@b4lk0n
Copy link

b4lk0n commented Nov 28, 2023

I'm facing the same issue with kitty - autocomplete always appears in the bottom left corner of a display

> fig --version
fig_cli 2.17.0

> kitty --version
kitty 0.31.0 created by Kovid Goyal

> echo $__CFBundleIdentifier
net.kovidgoyal.kitty

> fig debug input-method
Installed? true
TISInputSource {
    bundle_id: Some(
        "io.fig.cursor",
    ),
    input_source_id: Some(
        "io.fig.cursor",
    ),
    input_source_category: Some(
        "TISCategoryPaletteInputSource",
    ),
    input_source_is_enabled: Some(
        true,
    ),
    input_source_is_selected: Some(
        true,
    ),
    localized_name: Some(
        "FigInputMethod",
    ),
    input_mode_id: None,
    category_keyboard: None,
}

@krissh-the-dev
Copy link

Facing the exact same issue mentioned by @b4lk0n with IntelliJ IDEA.

@oilcake
Copy link

oilcake commented Feb 15, 2024

I still have this issue with all terminal emulators besides iTerm2. MacOS Catalina.

@carlitos081
Copy link

I have this issue too on mac with Intellij terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal:Jetbrains Issues related to Jetbrains type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests